#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements.  See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership.  The ASF licenses this file
# to you 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.
#

syscfg.defs:
    BSP_NRF51:
        description: 'Set to indicate that BSP has NRF51'
        value: 1

    UART_0:
        description: 'Whether to enable UART0'
        value: 1
    UART_0_PIN_TX:
        description: 'TX pin for UART0'
        value: 9
    UART_0_PIN_RX:
        description: 'TX pin for UART0'
        value: 11
    UART_0_PIN_RTS:
        description: 'RTS pin for UART0'
        value: 8
    UART_0_PIN_CTS:
        description: 'CTS pin for UART0'
        value: 10

    I2C_0_PIN_SCL:
        description: 'SCL pin for I2C_0'
        value:  7
    I2C_0_PIN_SDA:
        description: 'SDA pin for I2C_0'
        value:  6
    I2C_0_FREQ_KHZ:
        description: 'Frequency in khz for I2C_0 bus'
        value:  100
    I2C_0_FREQUENCY:
        description: 'Use I2C_0_FREQ_KHZ instead'
        defunct: 1
        value:  100
    I2C_0_SDA_PIN:
        description: 'Use I2C_0_PIN_SDA instead'
        defunct: 1
        value:  6
    I2C_0_SCL_PIN:
        description: 'Use I2C_0_PIN_SCL instead'
        defunct: 1
        value:  7

    I2C_1_PIN_SCL:
        description: 'SCL pin for I2C_1'
        value:  29
    I2C_1_PIN_SDA:
        description: 'SDA pin for I2C_1'
        value:  28
    I2C_1_FREQ_KHZ:
        description: 'Frequency in khz for I2C_1 bus'
        value:  100
    I2C_1_FREQUENCY:
        description: 'Use I2C_1_FREQ_KHZ instead'
        defunct: 1
        value:  100
    I2C_1_SDA_PIN:
        description: 'Use I2C_1_PIN_SDA instead'
        defunct: 1
        value:  28
    I2C_1_SCL_PIN:
        description: 'Use I2C_1_PIN_SCL instead'
        defunct: 1
        value:  29


    TIMER_0:
        description: 'NRF51 Timer 0'
        value:  1
    TIMER_1:
        description: 'NRF51 Timer 1'
        value:  0
    TIMER_2:
        description: 'NRF51 Timer 2'
        value:  0
    TIMER_3:
        description: 'NRF51 RTC0'
        value:  0

syscfg.defs.BLE_CONTROLLER:
    TIMER_0:
        value: 0
    TIMER_3:
        value: 1

syscfg.vals:
    # Enable nRF51822 MCU and common startup code
    MCU_TARGET: nRF51822
    MCU_COMMON_STARTUP: 1

    CONFIG_FCB_FLASH_AREA: FLASH_AREA_NFFS
    REBOOT_LOG_FLASH_AREA: FLASH_AREA_REBOOT_LOG
    NFFS_FLASH_AREA: FLASH_AREA_NFFS
    COREDUMP_FLASH_AREA: FLASH_AREA_IMAGE_1
    MCU_DCDC_ENABLED: 1
    MCU_LFCLK_SOURCE: LFXO

syscfg.vals.BLE_CONTROLLER:
    OS_CPUTIME_FREQ: 32768
    OS_CPUTIME_TIMER_NUM: 3
    BLE_LL_RFMGMT_ENABLE_TIME: 1500
