#
# Copyright (c) 2018 Nordic Semiconductor
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

# Enable the UART driver
CONFIG_UART_ASYNC_API=y
CONFIG_NRFX_UARTE0=y
CONFIG_SERIAL=y

CONFIG_GPIO=y

# Make sure printk is printing to the UART console
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y

CONFIG_HEAP_MEM_POOL_SIZE=2048

CONFIG_BT=y
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_DEVICE_NAME="Nordic_UART_Service"
CONFIG_BT_MAX_CONN=1
CONFIG_BT_MAX_PAIRED=1

# Enable the NUS service
CONFIG_BT_NUS=y
# CONFIG_BT_NUS_UART_BUFFER_SIZE=250

# Enable bonding
CONFIG_BT_SETTINGS=y
CONFIG_FLASH=y
CONFIG_FLASH_PAGE_LAYOUT=y
CONFIG_FLASH_MAP=y

# Enable DK LED and Buttons library
CONFIG_DK_LIBRARY=y

CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048
# Config logger
CONFIG_LOG=y
CONFIG_USE_SEGGER_RTT=y
CONFIG_LOG_BACKEND_RTT=y
CONFIG_LOG_BACKEND_UART=n
CONFIG_LOG_PRINTK=n

CONFIG_ASSERT=y

CONFIG_WATCHDOG=y
CONFIG_ADC=y                # 啟用 ADC API
CONFIG_ADC_NRFX_SAADC=y     # 啟用 nRF SAADC 驅動

# 啟用 counter 子系統
CONFIG_COUNTER=y

CONFIG_CLOCK_CONTROL_NRF=y

# enabled SYSCOUNTER（GRTC）for initial
CONFIG_NRF_GRTC_START_SYSCOUNTER=y

# enabled GRTC 
CONFIG_NRFX_GRTC=y
CONFIG_NRF_GRTC_TIMER=y

# wake up source
# CONFIG_GRTC_WAKEUP_ENABLE=y
# CONFIG_GPIO_WAKEUP_ENABLE=n

# 不要於開機時顯示 Zephyr 版本訊息
CONFIG_BOOT_BANNER=n
CONFIG_NCS_BOOT_BANNER=n

# SPI
CONFIG_SPI=y
CONFIG_MPU_ALLOW_FLASH_WRITE=y
CONFIG_SETTINGS=y
CONFIG_PM_PARTITION_SIZE_SETTINGS_STORAGE=0x4000
CONFIG_FLASH_JESD216_API=y
CONFIG_SPI_NOR=y


