demo/uart_blaster/nvm/nvm_defaults.c

/*******************************************************************************
* # License
* Copyright 2019 Silicon Laboratories Inc. www.silabs.com
*******************************************************************************
*
* The licensor of this software is Silicon Laboratories Inc. Your use of this
* software is governed by the terms of Silicon Labs Master Software License
* Agreement (MSLA) available at
* www.silabs.com/about-us/legal/master-software-license-agreement. This
* software is distributed to you in Source Code format and is governed by the
* sections of the MSLA applicable to Source Code.
*
******************************************************************************/
#include "nvm_settings.h"
#define DEFAULT_UART_CONFIG \
{ \
.baud_rate = 115200, \
.data_width = GOS_UART_WIDTH_8BIT, \
.parity = GOS_UART_NO_PARITY, \
.stop_bits = GOS_UART_STOP_BITS_1, \
.flow_control = GOS_UART_FLOW_CONTROL_DISABLED \
}
#define DEFAULT_FLAGS (UART_BLASTER_FLAG_RX_ENABLED | \
UART_BLASTER_FLAG_TX_ENABLED | \
UART_BLASTER_FLAG_VALIDATE_RX_DATA | \
UART_BLASTER_FLAG_CONFIG_UART_ENABLED)
#define DEFAULT_BLASTER_SETTINGS \
{ \
.rx_length = 1024, \
.rx_delay = 0, \
.rx_buffer_size = 4096, \
.tx_length = 1024, \
.tx_delay = 32, \
.flags = DEFAULT_FLAGS, \
.uart_id = GOS_UART_1, \
.uart = DEFAULT_UART_CONFIG, \
.log_level = UART_BLASTER_LOG_LEVEL_DEBUG \
}
// these values will automatically be loaded into NVM on startup
GOS_NVM_CREATE_DEFAULT_ENTRY(BLASTER, SETTINGS, uart_blaster_settings_t, DEFAULT_BLASTER_SETTINGS);