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

CONFIG_APP_VERSION="v1.0.3"

# Logging
CONFIG_LOG=y
CONFIG_LOG_SPEED=y

# Button and LED support
CONFIG_DK_LIBRARY=y

# NewLib C
CONFIG_NEWLIB_LIBC=y
CONFIG_NEWLIB_LIBC_FLOAT_PRINTF=y

# Network
CONFIG_NETWORKING=y
CONFIG_NET_NATIVE=n
CONFIG_NET_SOCKETS=y
CONFIG_NET_SOCKETS_OFFLOAD=y
CONFIG_NET_SOCKETS_POSIX_NAMES=y

# Memory
CONFIG_HEAP_MEM_POOL_SIZE=32768
CONFIG_MAIN_STACK_SIZE=8192
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048

# Modem library
CONFIG_NRF_MODEM_LIB=y
CONFIG_MODEM_INFO=y
CONFIG_MODEM_INFO_ADD_NETWORK=y
							   

# Get Date/Time from modem once it is connected
CONFIG_DATE_TIME=y

# LTE link control
CONFIG_LTE_LINK_CONTROL=y
CONFIG_LTE_NETWORK_MODE_LTE_M_NBIOT=y

# CoAP
# Enable the CoAP library
CONFIG_COAP=y

# Configure the CoAP server hostname
CONFIG_COAP_SERVER_HOSTNAME="63.176.25.58"

# MCUBOOT - Needed by FOTA
CONFIG_BOOTLOADER_MCUBOOT=y
CONFIG_MCUBOOT_IMG_MANAGER=y
CONFIG_STREAM_FLASH_ERASE=y

# Image manager
CONFIG_IMG_MANAGER=y
CONFIG_STREAM_FLASH=y
CONFIG_FLASH_MAP=y
CONFIG_FLASH=y
CONFIG_IMG_ERASE_PROGRESSIVELY=y

#Configure SIM
# CONFIG_LTE_NETWORK_MODE_NBIOT=y
# CONFIG_LTE_NETWORK_MODE_LTE_M=y
# CONFIG_PDN=y
# CONFIG_PDN_DEFAULTS_OVERRIDE=y
# EIOT Club APN
# CONFIG_PDN_DEFAULT_APN="data641003"
# 1nce APN
# CONFIG_PDN_DEFAULT_APN="iot.1nce.net"
# CONFIG_PDN_DEFAULT_FAM_IPV4V6=y

# Enable Kconfigs for SPI
CONFIG_SPI=y
CONFIG_SPI_NRFX=y
CONFIG_NRFX_SPIM1=y

CONFIG_TFM_SECURE_UART=n
CONFIG_TFM_LOG_LEVEL_SILENCE=y

CONFIG_DISPLAY=y

CONFIG_CUSTOM_IT8951_DRIVER=y

CONFIG_CUSTOM_WCP1FLASH_DRIVER=y

# Turn On I2C Slave (TWIS) mode 
CONFIG_I2C=y
CONFIG_I2C_NRFX=y
CONFIG_NRFX_TWIS2=y

# AWS IoT library
CONFIG_AWS_IOT=y
CONFIG_AWS_IOT_BROKER_HOST_NAME="aq7wrb7dppr0o-ats.iot.eu-central-1.amazonaws.com"
# CONFIG_AWS_IOT_AUTO_DEVICE_SHADOW_REQUEST=n
# CONFIG_AWS_IOT_TOPIC_GET_ACCEPTED_SUBSCRIBE=n
# CONFIG_AWS_IOT_TOPIC_GET_REJECTED_SUBSCRIBE=n
# CONFIG_AWS_IOT_TOPIC_UPDATE_ACCEPTED_SUBSCRIBE=n
# CONFIG_AWS_IOT_TOPIC_UPDATE_REJECTED_SUBSCRIBE=n
# CONFIG_AWS_IOT_TOPIC_UPDATE_DELTA_SUBSCRIBE=n
# CONFIG_AWS_IOT_TOPIC_DELETE_ACCEPTED_SUBSCRIBE=n
# CONFIG_AWS_IOT_TOPIC_DELETE_REJECTED_SUBSCRIBE=n
CONFIG_AWS_IOT_TOPIC_UPDATE_DELTA_SUBSCRIBE=n
CONFIG_AWS_IOT_TOPIC_GET_ACCEPTED_SUBSCRIBE=n
CONFIG_AWS_IOT_TOPIC_GET_REJECTED_SUBSCRIBE=n

# MQTT helper library
CONFIG_MQTT_HELPER=y
CONFIG_MQTT_HELPER_SEC_TAG=3661435
CONFIG_MQTT_HELPER_LAST_WILL=y
CONFIG_MQTT_HELPER_STACK_SIZE=4096

CONFIG_REBOOT=y
CONFIG_HW_ID_LIBRARY=y
CONFIG_HW_ID_LIBRARY_SOURCE_IMEI=y

# MQTT - Maximum MQTT keepalive timeout specified by AWS IoT Core
CONFIG_MQTT_KEEPALIVE=1200
CONFIG_MQTT_CLEAN_SESSION=y

# AT Host
CONFIG_UART_INTERRUPT_DRIVEN=y
CONFIG_AT_HOST_LIBRARY=y

# AWS FOTA
CONFIG_AWS_FOTA=y
CONFIG_FOTA_DOWNLOAD=y
CONFIG_DFU_TARGET=y

# CJSON
CONFIG_CJSON_LIB=y

# Download client (needed by AWS FOTA)
CONFIG_DOWNLOAD_CLIENT=y
CONFIG_DOWNLOAD_CLIENT_STACK_SIZE=4096
