You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
49 lines
1001 B
49 lines
1001 B
3 months ago
|
#include "CFG.h"
|
||
|
|
||
|
//����Ĭ�Ͽɸ��IJ���
|
||
|
uart_param_t uart_param_def={
|
||
|
.baud=115200,
|
||
|
.parity=NO_PARITY,
|
||
|
};
|
||
|
//����ʵʱ�ɸ��IJ���
|
||
|
uart_param_t uart_param = {0};
|
||
|
|
||
|
//LoRaĬ�Ͽɸ��IJ���
|
||
|
lora_param_t lora_param_def={
|
||
|
.preamble_len_tx = 8,
|
||
|
.preamble_len_rx = 8,
|
||
|
.sf_tx = 7,
|
||
|
.sf_rx = 7,
|
||
|
.power = 22,
|
||
|
.bw_tx = 0,
|
||
|
.bw_rx = 0,
|
||
|
.freq_tx = 470300000,
|
||
|
.freq_rx = 470300000,
|
||
|
.is_public_network = false,
|
||
|
.tx_timeout=0,
|
||
|
.rx_timeout=0,
|
||
|
};
|
||
|
//LoRaʵʱ�ɸ��IJ���
|
||
|
lora_param_t lora_param = {0};
|
||
|
|
||
|
//�ۺ�����
|
||
|
|
||
|
//���ڴ���ȡ�ɸ��IJ���
|
||
|
void config_get_from_flash(void)
|
||
|
{
|
||
|
//��flash
|
||
|
//�ж�flash�Ƿ�������
|
||
|
//�ǣ������������ݸ�ֵ��ʵʱ����
|
||
|
//��Ĭ��ֵ��ֵ��ʵʱ������������flash
|
||
|
lora_param = lora_param_def;
|
||
|
uart_param = uart_param_def;
|
||
|
}
|
||
|
|
||
|
//�ָ�ΪĬ�ϲ���
|
||
|
void config_set_def(void)
|
||
|
{
|
||
|
//��Ĭ��ֵ��ֵ��ʵʱ������������flash
|
||
|
lora_param = lora_param_def;
|
||
|
uart_param = uart_param_def;
|
||
|
}
|