#
# Copyright (c) 2020 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: LicenseRef-BSD-5-Clause-Nordic
#
# General config
CONFIG_NCS_SAMPLES_DEFAULTS=n
CONFIG_REBOOT=y

# NEWLIB C
CONFIG_NEWLIB_LIBC=y
CONFIG_NEWLIB_LIBC_FLOAT_PRINTF=y

# Network
CONFIG_NETWORKING=y
CONFIG_NET_NATIVE=n

# LTE link control
CONFIG_LTE_LINK_CONTROL=y
CONFIG_LTE_NETWORK_MODE_NBIOT=n
CONFIG_LTE_NETWORK_MODE_LTE_M=y

## PSM
CONFIG_LTE_PSM_REQ_RPTAU="00000110"
CONFIG_LTE_PSM_REQ_RAT="00000000"

## eDRX
CONFIG_LTE_EDRX_REQ_VALUE="0000"
CONFIG_LTE_RAI_REQ_VALUE="0"

# BSD library
CONFIG_BSD_LIBRARY=y
CONFIG_BSD_LIBRARY_SYS_INIT=n

# AT Host
CONFIG_UART_INTERRUPT_DRIVEN=y
CONFIG_AT_HOST_LIBRARY=y

# AWS IoT library
CONFIG_AWS_IOT=y
CONFIG_AWS_IOT_CLIENT_ID_STATIC="352656100333148"
CONFIG_AWS_IOT_BROKER_HOST_NAME="a3122exvv01xdw-ats.iot.us-east-2.amazonaws.com"
CONFIG_AWS_IOT_SEC_TAG=12345678
CONFIG_AWS_IOT_APP_SUBSCRIPTION_LIST_COUNT=4
CONFIG_AWS_IOT_CONNECTION_POLL_THREAD=y
CONFIG_AWS_IOT_CLIENT_ID_MAX_LEN=20
CONFIG_AWS_IOT_TOPIC_UPDATE_ACCEPTED_SUBSCRIBE=y
CONFIG_AWS_IOT_TOPIC_GET_ACCEPTED_SUBSCRIBE=y
CONFIG_AWS_IOT_TOPIC_GET_REJECTED_SUBSCRIBE=n
CONFIG_AWS_IOT_TOPIC_UPDATE_DELTA_SUBSCRIBE=n
CONFIG_MQTT_KEEPALIVE=1140
CONFIG_AWS_IOT_MQTT_RX_TX_BUFFER_LEN=3000
CONFIG_AWS_IOT_MQTT_PAYLOAD_BUFFER_LEN=3000
CONFIG_AWS_IOT_IPV6=n


# Date Time library
CONFIG_DATE_TIME=y

# Modem information
CONFIG_MODEM_INFO=y

# Heap and stacks
CONFIG_HEAP_MEM_POOL_SIZE=8192
CONFIG_MAIN_STACK_SIZE=4096
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048

# MCUBOOT
CONFIG_BOOTLOADER_MCUBOOT=y
CONFIG_MCUBOOT_IMG_MANAGER=y

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

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

# CJSON
CONFIG_CJSON_LIB=y

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


CONFIG_ADC=y
CONFIG_I2C=y
CONFIG_SENSOR=y

# LIS2DH accelerometer
CONFIG_LIS2DH=y
CONFIG_LIS2DH_OPER_MODE_LOW_POWER=y
CONFIG_LIS2DH_ODR_1=n
CONFIG_LIS2DH_TRIGGER_GLOBAL_THREAD=y									 

# Pressure sensor
CONFIG_LPS22HB=y
#CONFIG_LPS22HB_SAMPLING_RATE=0

# GPIO and PWM config
CONFIG_GPIO=y
CONFIG_PWM=y

# Uart console for debug and logs
CONFIG_SERIAL=y
CONFIG_UART_CONSOLE_ON_DEV_NAME="UART_0"
CONFIG_DEPRECATED_ZEPHYR_INT_TYPES=y
CONFIG_UART_INTERRUPT_DRIVEN=y

# Flash
CONFIG_FLASH=y
CONFIG_FLASH_PAGE_LAYOUT=y
CONFIG_NVS=y
CONFIG_MPU_ALLOW_FLASH_WRITE=y
CONFIG_IMG_ERASE_PROGRESSIVELY=y

#RTT
CONFIG_USE_SEGGER_RTT=y
CONFIG_RTT_CONSOLE=y
CONFIG_UART_CONSOLE=n



