完成1.0版本功能
This commit is contained in:
@@ -50,6 +50,7 @@
|
||||
#include "switch_s.h"
|
||||
#include "key.h"
|
||||
#include "fmc_spi_1.h"
|
||||
#include "rf433_decoder.h"
|
||||
/**
|
||||
****************************************************************************************
|
||||
* @addtogroup DRIVERS
|
||||
@@ -268,6 +269,7 @@ void board_init()
|
||||
chx_gpio_init();
|
||||
app_key_init();
|
||||
switch_init();
|
||||
rf433_decoder_init();
|
||||
|
||||
#if (POWER_ON)
|
||||
power_on_check();
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include "rf433.h"
|
||||
#include <stdbool.h>
|
||||
#include "xc_drv_gpio.h"
|
||||
#include "key.h"
|
||||
#include "led.h"
|
||||
@@ -6,11 +7,12 @@
|
||||
#include "switch_s.h"
|
||||
#include "timeslice.h"
|
||||
#include "dbg.h"
|
||||
#include "rf433_decoder.h"
|
||||
//用bit表示通道
|
||||
#define CH_GPIO2 0x01
|
||||
#define CH_GPIO5 0x10
|
||||
|
||||
|
||||
Rf433DecoderFrame_t rf433_frame;
|
||||
|
||||
uint32_t receive_temp;
|
||||
uint32_t receive_data;
|
||||
@@ -23,6 +25,8 @@ uint8_t key_state=0;
|
||||
uint8_t KEY_STATE_re=0; // 长按
|
||||
uint8_t long_flag_s=0;
|
||||
|
||||
uint8_t receive_finsh_flag=0;
|
||||
|
||||
static uint8_t power=2;
|
||||
|
||||
uint8_t res_data=255; //433返回的最后一个控制字节(低八位)
|
||||
@@ -43,6 +47,12 @@ uint8_t flash_ch2_state=0;
|
||||
|
||||
union rf433_flag rf_flag = {0};
|
||||
|
||||
|
||||
#define rf433_long_time 500
|
||||
uint16_t long_timer=0;
|
||||
uint8_t last_H_adress=0;
|
||||
uint8_t last_L_adress=0;
|
||||
|
||||
typedef struct {
|
||||
uint32_t KEY_STATE_Click; // 单击
|
||||
uint32_t KEY_STATE_LONG_PRESS; // 长按
|
||||
@@ -305,8 +315,8 @@ void ble_mode_scan(void)
|
||||
|
||||
void _433_fun(void)
|
||||
{
|
||||
if(Key_TypeDef.KEY_STATE_Click==1||KEY_STATE_re==1) return;
|
||||
set_click(); //设置单击长按
|
||||
// if(Key_TypeDef.KEY_STATE_Click==1||KEY_STATE_re==1) return;
|
||||
// set_click(); //设置单击长按
|
||||
|
||||
uint8_t ch_mask = adress_ch_flag[adress_index_ture];
|
||||
|
||||
@@ -370,6 +380,13 @@ void _433_fun(void)
|
||||
void scan_433(void)
|
||||
{
|
||||
uint8_t i=0;
|
||||
bool rf433_decoder_flag=false;
|
||||
rf433_decoder_flag=rf433_decoder_get_frame(&rf433_frame);
|
||||
|
||||
if(long_timer>0)
|
||||
{
|
||||
long_timer--;
|
||||
}
|
||||
|
||||
if(rf433_sw_flag==1)
|
||||
{
|
||||
@@ -386,7 +403,15 @@ void scan_433(void)
|
||||
led_state=2;
|
||||
}
|
||||
|
||||
if(power==3 && rf_flag.rf_receive_flag.receive_finish==1 && key_state==KEY_SHORT ) //双击对码GPIO2
|
||||
if(rf433_decoder_flag)
|
||||
{
|
||||
adress_H = rf433_frame.addr_h;
|
||||
adress_L = rf433_frame.addr_l;
|
||||
res_data = rf433_frame.key ;
|
||||
//LOGI("finsh finsh finsh\r\n");
|
||||
}
|
||||
//LOGI("rf433_decoder_flag %d adress_H 0x%02x adress_L 0x%02x res_data 0x%02x\r\n",rf433_decoder_flag,adress_H,adress_L,res_data);
|
||||
if(power==3 && rf433_decoder_flag==true && key_state==KEY_SHORT ) //双击对码GPIO2
|
||||
{
|
||||
|
||||
|
||||
@@ -397,8 +422,8 @@ void scan_433(void)
|
||||
|
||||
uint8_t ch_mask=CH_GPIO2; //对应位掩码
|
||||
|
||||
adress_H=((receive_data>>16)&0xff); //读取高八位地址码
|
||||
adress_L=((receive_data>>8)&0xff); //读取低八位地址码
|
||||
// adress_H=((receive_data>>16)&0xff); //读取高八位地址码
|
||||
// adress_L=((receive_data>>8)&0xff); //读取低八位地址码
|
||||
|
||||
if(adress_index>4)
|
||||
{
|
||||
@@ -433,7 +458,7 @@ void scan_433(void)
|
||||
}
|
||||
|
||||
|
||||
else if(power==4 && rf_flag.rf_receive_flag.receive_finish==1 && key_state==KEY_SHORT ) //四击对码GPIO5
|
||||
else if(power==4 && rf433_decoder_flag==true && key_state==KEY_SHORT ) //四击对码GPIO5
|
||||
{
|
||||
|
||||
|
||||
@@ -443,8 +468,8 @@ void scan_433(void)
|
||||
|
||||
uint8_t ch_mask=CH_GPIO5; //对应位掩码
|
||||
|
||||
adress_H=((receive_data>>16)&0xff); //读取高八位地址码
|
||||
adress_L=((receive_data>>8)&0xff); //读取低八位地址码
|
||||
// adress_H=((receive_data>>16)&0xff); //读取高八位地址码
|
||||
// adress_L=((receive_data>>8)&0xff); //读取低八位地址码
|
||||
|
||||
if(adress_index>4)
|
||||
{
|
||||
@@ -479,14 +504,18 @@ void scan_433(void)
|
||||
|
||||
|
||||
|
||||
if(power==2 && rf_flag.rf_receive_flag.receive_finish==1)
|
||||
if(power==2 && rf433_decoder_flag==true)
|
||||
{
|
||||
|
||||
if(long_timer>0 && (last_H_adress == adress_H && last_L_adress == adress_L))
|
||||
{
|
||||
return;
|
||||
}
|
||||
adress_index_ture = 0xFF; // 默认无效
|
||||
for(i=0; i<5; i++)
|
||||
{
|
||||
if( adress_H_array[i] == ((receive_data>>16)&0xff) &&
|
||||
adress_L_array[i] == ((receive_data>>8)&0xff) )
|
||||
if( adress_H_array[i] == adress_H &&
|
||||
adress_L_array[i] == adress_L )
|
||||
{
|
||||
adress_index_ture = i; // 找到索引
|
||||
break;
|
||||
@@ -496,18 +525,12 @@ void scan_433(void)
|
||||
// 找到有效索引执行
|
||||
if(adress_index_ture != 0xFF)
|
||||
{
|
||||
// adress_H=((receive_data>>16)&0xff); //读取高八位地址码
|
||||
// adress_L=((receive_data>>8)&0xff); //读取低八位地址码
|
||||
//LOGI("%d %x %x\r\n",adress_index_ture,adress_H,adress_L);
|
||||
_433_fun();
|
||||
flash_run();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
rf_flag.rf_receive_flag.receive_finish=0;
|
||||
last_H_adress=adress_H;
|
||||
last_L_adress=adress_L;
|
||||
long_timer=rf433_long_time;
|
||||
}
|
||||
|
||||
if( key_state==KEY_LONG )
|
||||
|
||||
@@ -0,0 +1,793 @@
|
||||
#include "rf433_decoder.h"
|
||||
#include "rf433_decoder_port.h"
|
||||
|
||||
#define RF433_FIFO_SIZE 256u
|
||||
|
||||
#define RF433_GLITCH_DYNAMIC_MIN 2u
|
||||
#define RF433_GLITCH_DYNAMIC_MAX 4u
|
||||
|
||||
#define RF433_SYNC_LOW_MIN 35u //45改35
|
||||
#define RF433_SYNC_LOW_MAX 200u //180改200
|
||||
#define RF433_SYNC_HIGH_MIN 1u
|
||||
#define RF433_SYNC_HIGH_MAX 15u //12改15
|
||||
|
||||
#define RF433_BIT_LEN 24u
|
||||
#define RF433_REPEAT_CONFIRM 1u //2改1
|
||||
|
||||
#define RF433_LEVEL_TIMEOUT 300u //300
|
||||
|
||||
#define RF433_BIT_TOTAL_MIN 3u //4改3
|
||||
#define RF433_BIT_TOTAL_MAX 40u //35改40
|
||||
|
||||
#define RF433_PROCESS_MAX_ONCE 32u
|
||||
|
||||
#define RF433_FRAME_SCORE_MIN 50u //70改50
|
||||
#define RF433_BIT_SCORE_GOOD 4u
|
||||
#define RF433_BIT_SCORE_NORMAL 3u
|
||||
#define RF433_BIT_SCORE_POOR 1u
|
||||
|
||||
#define RF433_WINDOW_TIGHT 0u
|
||||
#define RF433_WINDOW_NORMAL 1u
|
||||
#define RF433_WINDOW_LOOSE 2u
|
||||
|
||||
|
||||
// 新增:连发屏蔽间隔(单位:100us采样tick,200=20ms内相同码只输出一次)
|
||||
#define RF433_ANTI_REPEAT_TICK 200u
|
||||
|
||||
|
||||
#if RF433_DECODER_DEBUG_PULSE
|
||||
#define RF433_PULSE_LOG(fmt, ...) RF433_DECODER_LOG(fmt, ##__VA_ARGS__)
|
||||
#else
|
||||
#define RF433_PULSE_LOG(fmt, ...)
|
||||
#endif
|
||||
|
||||
#if RF433_DECODER_DEBUG_DETAIL
|
||||
#define RF433_DETAIL_LOG(fmt, ...) RF433_DECODER_LOG(fmt, ##__VA_ARGS__)
|
||||
#else
|
||||
#define RF433_DETAIL_LOG(fmt, ...)
|
||||
#endif
|
||||
|
||||
typedef enum
|
||||
{
|
||||
RF433_STATE_IDLE = 0,
|
||||
RF433_STATE_DATA,
|
||||
} Rf433State_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint8_t level;
|
||||
uint16_t width;
|
||||
} Rf433Pulse_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
volatile Rf433Pulse_t fifo[RF433_FIFO_SIZE];
|
||||
volatile uint16_t w;
|
||||
volatile uint16_t r;
|
||||
volatile uint16_t lost;
|
||||
uint8_t last_level;
|
||||
uint16_t width;
|
||||
uint8_t inited;
|
||||
} Rf433Fifo_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
Rf433State_t state;
|
||||
uint16_t last_high;
|
||||
uint16_t last_low;
|
||||
uint16_t t;
|
||||
uint16_t short_min;
|
||||
uint16_t short_max;
|
||||
uint16_t long_min;
|
||||
uint16_t long_max;
|
||||
uint32_t data;
|
||||
uint8_t bit_cnt;
|
||||
uint8_t bit_score_sum;
|
||||
uint8_t frame_score;
|
||||
uint8_t ppl_locked;
|
||||
uint8_t window_mode;
|
||||
uint32_t last_code;
|
||||
uint8_t same_cnt;
|
||||
Rf433DecoderFrame_t frame;
|
||||
bool frame_ready;
|
||||
|
||||
uint16_t anti_repeat_tick; // 新增:连发屏蔽倒计时
|
||||
} Rf433Decode_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
Rf433Pulse_t p0;
|
||||
Rf433Pulse_t p1;
|
||||
Rf433Pulse_t p2;
|
||||
uint8_t cnt;
|
||||
} Rf433Repair_t;
|
||||
|
||||
static Rf433Fifo_t s_fifo;
|
||||
static Rf433Decode_t s_dec;
|
||||
static Rf433Repair_t s_repair;
|
||||
|
||||
static uint16_t rf433_limit_t(uint16_t t)
|
||||
{
|
||||
if (t < 2u)
|
||||
{
|
||||
t = 2u;
|
||||
}
|
||||
|
||||
if (t > 12u)
|
||||
{
|
||||
t = 12u;
|
||||
}
|
||||
|
||||
return t;
|
||||
}
|
||||
|
||||
static void rf433_update_range_by_t(uint16_t t)
|
||||
{
|
||||
t = rf433_limit_t(t);
|
||||
s_dec.t = t;
|
||||
|
||||
if (s_dec.window_mode == RF433_WINDOW_TIGHT)
|
||||
{
|
||||
s_dec.short_min = 1u;
|
||||
s_dec.short_max = (uint16_t)(t + t / 2u + 2u);
|
||||
s_dec.long_min = (uint16_t)(t * 2u);
|
||||
s_dec.long_max = (uint16_t)(t * 4u + 2u);
|
||||
}
|
||||
else if (s_dec.window_mode == RF433_WINDOW_LOOSE)
|
||||
{
|
||||
s_dec.short_min = 1u;
|
||||
s_dec.short_max = (uint16_t)(t * 2u + 4u);
|
||||
s_dec.long_min = (uint16_t)(t + t / 2u);
|
||||
if (s_dec.long_min < 3u)
|
||||
{
|
||||
s_dec.long_min = 3u;
|
||||
}
|
||||
s_dec.long_max = (uint16_t)(t * 7u + 4u);
|
||||
}
|
||||
else
|
||||
{
|
||||
s_dec.short_min = 1u;
|
||||
s_dec.short_max = (uint16_t)(t * 2u + 3u);
|
||||
s_dec.long_min = (uint16_t)(t + t / 2u);
|
||||
if (s_dec.long_min < 3u)
|
||||
{
|
||||
s_dec.long_min = 3u;
|
||||
}
|
||||
s_dec.long_max = (uint16_t)(t * 7u + 3u);
|
||||
}
|
||||
}
|
||||
|
||||
static void rf433_decode_reset(void)
|
||||
{
|
||||
s_dec.state = RF433_STATE_IDLE;
|
||||
s_dec.last_high = 0;
|
||||
s_dec.last_low = 0;
|
||||
s_dec.data = 0;
|
||||
s_dec.bit_cnt = 0;
|
||||
s_dec.bit_score_sum = 0;
|
||||
s_dec.frame_score = 0;
|
||||
s_dec.window_mode = RF433_WINDOW_NORMAL;
|
||||
rf433_update_range_by_t(4u);
|
||||
}
|
||||
|
||||
static void rf433_repair_reset(void)
|
||||
{
|
||||
s_repair.cnt = 0;
|
||||
s_repair.p0.level = 0;
|
||||
s_repair.p0.width = 0;
|
||||
s_repair.p1.level = 0;
|
||||
s_repair.p1.width = 0;
|
||||
s_repair.p2.level = 0;
|
||||
s_repair.p2.width = 0;
|
||||
}
|
||||
|
||||
static void rf433_debug_reset(const char *reason, uint16_t high, uint16_t low)
|
||||
{
|
||||
RF433_DETAIL_LOG("[RF433 RESET] %s bits=%d high=%d low=%d data=0x%06X T=%d win=%d lost=%d\r\n",
|
||||
reason,
|
||||
s_dec.bit_cnt,
|
||||
high,
|
||||
low,
|
||||
(unsigned int)s_dec.data,
|
||||
s_dec.t,
|
||||
s_dec.window_mode,
|
||||
s_fifo.lost);
|
||||
}
|
||||
|
||||
void rf433_decoder_init(void)
|
||||
{
|
||||
s_fifo.w = 0;
|
||||
s_fifo.r = 0;
|
||||
s_fifo.lost = 0;
|
||||
s_fifo.last_level = 0;
|
||||
s_fifo.width = 0;
|
||||
s_fifo.inited = 0;
|
||||
|
||||
s_dec.last_code = 0;
|
||||
s_dec.same_cnt = 0;
|
||||
s_dec.frame_ready = false;
|
||||
s_dec.ppl_locked = 0;
|
||||
s_dec.window_mode = RF433_WINDOW_NORMAL;
|
||||
s_dec.anti_repeat_tick=0; //新增
|
||||
|
||||
rf433_decode_reset();
|
||||
rf433_repair_reset();
|
||||
}
|
||||
|
||||
void rf433_decoder_sample(uint8_t level)
|
||||
{
|
||||
uint16_t next;
|
||||
Rf433Pulse_t pulse;
|
||||
|
||||
level = level ? 1u : 0u;
|
||||
|
||||
if (!s_fifo.inited)
|
||||
{
|
||||
s_fifo.last_level = level;
|
||||
s_fifo.width = 1;
|
||||
s_fifo.inited = 1;
|
||||
return;
|
||||
}
|
||||
|
||||
if (level == s_fifo.last_level)
|
||||
{
|
||||
if (s_fifo.width < 0xFFFFu)
|
||||
{
|
||||
s_fifo.width++;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
pulse.level = s_fifo.last_level;
|
||||
pulse.width = s_fifo.width;
|
||||
s_fifo.last_level = level;
|
||||
s_fifo.width = 1;
|
||||
|
||||
next = (uint16_t)((s_fifo.w + 1u) % RF433_FIFO_SIZE);
|
||||
if (next != s_fifo.r)
|
||||
{
|
||||
s_fifo.fifo[s_fifo.w] = pulse;
|
||||
s_fifo.w = next;
|
||||
}
|
||||
else if (s_fifo.lost < 0xFFFFu)
|
||||
{
|
||||
s_fifo.lost++;
|
||||
}
|
||||
}
|
||||
|
||||
static bool rf433_fifo_pop(Rf433Pulse_t *pulse)
|
||||
{
|
||||
if (pulse == 0 || s_fifo.r == s_fifo.w)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
*pulse = s_fifo.fifo[s_fifo.r];
|
||||
s_fifo.r = (uint16_t)((s_fifo.r + 1u) % RF433_FIFO_SIZE);
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool rf433_is_sync(uint16_t high, uint16_t low)
|
||||
{
|
||||
if (high == 0u || low == 0u)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (high < RF433_SYNC_HIGH_MIN || high > RF433_SYNC_HIGH_MAX)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (low < RF433_SYNC_LOW_MIN || low > RF433_SYNC_LOW_MAX)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (low < (uint16_t)(high * 10u)) //12
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static void rf433_ppl_update_by_sync(uint16_t sync_low)
|
||||
{
|
||||
uint16_t t_new = rf433_limit_t((uint16_t)(sync_low / 31u));
|
||||
uint16_t t_filter;
|
||||
|
||||
if (s_dec.ppl_locked)
|
||||
{
|
||||
t_filter = (uint16_t)((s_dec.t * 7u + t_new) / 8u);
|
||||
}
|
||||
else
|
||||
{
|
||||
t_filter = (uint16_t)((s_dec.t * 3u + t_new) / 4u);
|
||||
}
|
||||
|
||||
rf433_update_range_by_t(t_filter);
|
||||
}
|
||||
|
||||
static void rf433_update_t_by_bit(uint16_t high, uint16_t low, uint8_t bit)
|
||||
{
|
||||
uint16_t t_new;
|
||||
uint16_t t_filter;
|
||||
|
||||
if (bit == 0u)
|
||||
{
|
||||
t_new = (uint16_t)((high + low / 3u) / 2u);
|
||||
}
|
||||
else
|
||||
{
|
||||
t_new = (uint16_t)((high / 3u + low) / 2u);
|
||||
}
|
||||
|
||||
t_new = rf433_limit_t(t_new);
|
||||
|
||||
if (s_dec.ppl_locked)
|
||||
{
|
||||
t_filter = (uint16_t)((s_dec.t * 7u + t_new) / 8u);
|
||||
}
|
||||
else
|
||||
{
|
||||
t_filter = (uint16_t)((s_dec.t * 3u + t_new) / 4u);
|
||||
}
|
||||
|
||||
rf433_update_range_by_t(t_filter);
|
||||
}
|
||||
|
||||
static uint16_t rf433_get_glitch_max(void)
|
||||
{
|
||||
uint16_t v = s_dec.t / 2u;
|
||||
|
||||
if (v < RF433_GLITCH_DYNAMIC_MIN)
|
||||
{
|
||||
v = RF433_GLITCH_DYNAMIC_MIN;
|
||||
}
|
||||
|
||||
if (v > RF433_GLITCH_DYNAMIC_MAX)
|
||||
{
|
||||
v = RF433_GLITCH_DYNAMIC_MAX;
|
||||
}
|
||||
|
||||
return v;
|
||||
}
|
||||
|
||||
static bool rf433_is_short(uint16_t width)
|
||||
{
|
||||
return ((width >= s_dec.short_min) && (width <= s_dec.short_max));
|
||||
}
|
||||
|
||||
static bool rf433_is_long(uint16_t width)
|
||||
{
|
||||
return ((width >= s_dec.long_min) && (width <= s_dec.long_max));
|
||||
}
|
||||
|
||||
static bool rf433_total_valid(uint16_t high, uint16_t low)
|
||||
{
|
||||
uint16_t total = (uint16_t)(high + low);
|
||||
return ((total >= RF433_BIT_TOTAL_MIN) && (total <= RF433_BIT_TOTAL_MAX));
|
||||
}
|
||||
|
||||
static bool rf433_decode_bit(uint16_t high, uint16_t low, uint8_t *bit)
|
||||
{
|
||||
if (bit == 0 || !rf433_total_valid(high, low))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (rf433_is_short(high) && rf433_is_long(low))
|
||||
{
|
||||
*bit = 0;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (rf433_is_long(high) && rf433_is_short(low))
|
||||
{
|
||||
*bit = 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
#if RF433_DECODER_DEBUG_DETAIL
|
||||
static const char *rf433_bit_fail_reason(uint16_t high, uint16_t low)
|
||||
{
|
||||
if (!rf433_total_valid(high, low))
|
||||
{
|
||||
return "total";
|
||||
}
|
||||
|
||||
if (!rf433_is_short(high) && !rf433_is_long(high))
|
||||
{
|
||||
return "high";
|
||||
}
|
||||
|
||||
if (!rf433_is_short(low) && !rf433_is_long(low))
|
||||
{
|
||||
return "low";
|
||||
}
|
||||
|
||||
return "pair";
|
||||
}
|
||||
#endif
|
||||
|
||||
static uint16_t rf433_abs_diff_u16(uint16_t a, uint16_t b)
|
||||
{
|
||||
return (a > b) ? (uint16_t)(a - b) : (uint16_t)(b - a);
|
||||
}
|
||||
|
||||
static uint8_t rf433_score_bit(uint16_t high, uint16_t low, uint8_t bit)
|
||||
{
|
||||
uint16_t ideal_high;
|
||||
uint16_t ideal_low;
|
||||
uint16_t err;
|
||||
|
||||
if (bit == 0u)
|
||||
{
|
||||
ideal_high = s_dec.t;
|
||||
ideal_low = (uint16_t)(s_dec.t * 3u);
|
||||
}
|
||||
else
|
||||
{
|
||||
ideal_high = (uint16_t)(s_dec.t * 3u);
|
||||
ideal_low = s_dec.t;
|
||||
}
|
||||
|
||||
err = (uint16_t)(rf433_abs_diff_u16(high, ideal_high) +
|
||||
rf433_abs_diff_u16(low, ideal_low));
|
||||
|
||||
if (err <= 2u)
|
||||
{
|
||||
return RF433_BIT_SCORE_GOOD;
|
||||
}
|
||||
|
||||
if (err <= 5u)
|
||||
{
|
||||
return RF433_BIT_SCORE_NORMAL;
|
||||
}
|
||||
|
||||
return RF433_BIT_SCORE_POOR;
|
||||
}
|
||||
|
||||
static uint8_t rf433_calc_frame_score(void)
|
||||
{
|
||||
uint16_t score;
|
||||
|
||||
if (s_dec.bit_cnt == 0u)
|
||||
{
|
||||
return 0u;
|
||||
}
|
||||
|
||||
score = (uint16_t)s_dec.bit_score_sum * 100u;
|
||||
score = score / (uint16_t)(RF433_BIT_LEN * RF433_BIT_SCORE_GOOD);
|
||||
return (score > 100u) ? 100u : (uint8_t)score;
|
||||
}
|
||||
|
||||
static void rf433_update_window_by_score(uint8_t score)
|
||||
{
|
||||
if (score >= 90u)
|
||||
{
|
||||
s_dec.window_mode = RF433_WINDOW_TIGHT;
|
||||
s_dec.ppl_locked = 1u;
|
||||
}
|
||||
else if (score >= 60u)
|
||||
{
|
||||
s_dec.window_mode = RF433_WINDOW_NORMAL;
|
||||
}
|
||||
else
|
||||
{
|
||||
s_dec.window_mode = RF433_WINDOW_LOOSE;
|
||||
s_dec.ppl_locked = 0u;
|
||||
}
|
||||
|
||||
rf433_update_range_by_t(s_dec.t);
|
||||
}
|
||||
|
||||
static void rf433_output_code(uint32_t code)
|
||||
{
|
||||
if (code == s_dec.last_code)
|
||||
{
|
||||
if (s_dec.same_cnt < 255u)
|
||||
{
|
||||
s_dec.same_cnt++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
s_dec.last_code = code;
|
||||
s_dec.same_cnt = 1;
|
||||
|
||||
// // 换码直接清空屏蔽计时,不同按键不拦截
|
||||
// s_dec.anti_repeat_tick = 0;
|
||||
}
|
||||
|
||||
RF433_DETAIL_LOG("[RF433 REPEAT] code=0x%06X same=%d/%d\r\n",
|
||||
(unsigned int)code,
|
||||
s_dec.same_cnt,
|
||||
RF433_REPEAT_CONFIRM);
|
||||
|
||||
if (s_dec.same_cnt >= RF433_REPEAT_CONFIRM)
|
||||
{
|
||||
s_dec.frame.code = code;
|
||||
s_dec.frame.bit_len = RF433_BIT_LEN;
|
||||
s_dec.frame.addr_h = (uint8_t)((code >> 16) & 0xFFu);
|
||||
s_dec.frame.addr_l = (uint8_t)((code >> 8) & 0xFFu);
|
||||
s_dec.frame.key = (uint8_t)(code & 0xFFu);
|
||||
s_dec.frame.score = s_dec.frame_score;
|
||||
s_dec.frame_ready = true;
|
||||
|
||||
// // 输出后刷新连发屏蔽倒计时,一段时间内不再输出同码
|
||||
// s_dec.anti_repeat_tick = RF433_ANTI_REPEAT_TICK;
|
||||
|
||||
s_dec.same_cnt = 0;
|
||||
|
||||
RF433_DECODER_LOG("[RF433 OK] code=0x%06X addr_h=0x%02X addr_l=0x%02X key=0x%02X score=%d\r\n",
|
||||
(unsigned int)s_dec.frame.code,
|
||||
s_dec.frame.addr_h,
|
||||
s_dec.frame.addr_l,
|
||||
s_dec.frame.key,
|
||||
s_dec.frame.score);
|
||||
}
|
||||
}
|
||||
|
||||
static void rf433_process_clean_pulse(Rf433Pulse_t pulse)
|
||||
{
|
||||
uint8_t bit;
|
||||
uint8_t bit_score;
|
||||
|
||||
if (pulse.width == 0u)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (pulse.width > RF433_LEVEL_TIMEOUT)
|
||||
{
|
||||
rf433_debug_reset("timeout", s_dec.last_high, pulse.width);
|
||||
rf433_decode_reset();
|
||||
rf433_repair_reset();
|
||||
return;
|
||||
}
|
||||
|
||||
if (pulse.level)
|
||||
{
|
||||
s_dec.last_high = pulse.width;
|
||||
return;
|
||||
}
|
||||
|
||||
s_dec.last_low = pulse.width;
|
||||
|
||||
if (rf433_is_sync(s_dec.last_high, s_dec.last_low))
|
||||
{
|
||||
s_dec.window_mode = s_dec.ppl_locked ? RF433_WINDOW_TIGHT : RF433_WINDOW_NORMAL;
|
||||
rf433_ppl_update_by_sync(s_dec.last_low);
|
||||
|
||||
RF433_DETAIL_LOG("[RF433 SYNC] high=%d low=%d T=%d short=%d-%d long=%d-%d win=%d lock=%d\r\n",
|
||||
s_dec.last_high,
|
||||
s_dec.last_low,
|
||||
s_dec.t,
|
||||
s_dec.short_min,
|
||||
s_dec.short_max,
|
||||
s_dec.long_min,
|
||||
s_dec.long_max,
|
||||
s_dec.window_mode,
|
||||
s_dec.ppl_locked);
|
||||
|
||||
s_dec.state = RF433_STATE_DATA;
|
||||
s_dec.data = 0;
|
||||
s_dec.bit_cnt = 0;
|
||||
s_dec.bit_score_sum = 0;
|
||||
s_dec.frame_score = 0;
|
||||
s_dec.last_high = 0;
|
||||
s_dec.last_low = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
if (s_dec.state != RF433_STATE_DATA ||
|
||||
s_dec.last_high == 0u ||
|
||||
s_dec.last_low == 0u)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (rf433_decode_bit(s_dec.last_high, s_dec.last_low, &bit))
|
||||
{
|
||||
bit_score = rf433_score_bit(s_dec.last_high, s_dec.last_low, bit);
|
||||
if (s_dec.bit_score_sum <= (uint8_t)(255u - bit_score))
|
||||
{
|
||||
s_dec.bit_score_sum += bit_score;
|
||||
}
|
||||
|
||||
rf433_update_t_by_bit(s_dec.last_high, s_dec.last_low, bit);
|
||||
s_dec.data <<= 1;
|
||||
if (bit)
|
||||
{
|
||||
s_dec.data |= 1u;
|
||||
}
|
||||
s_dec.bit_cnt++;
|
||||
|
||||
RF433_DETAIL_LOG("[RF433 BIT] idx=%02d bit=%d high=%d low=%d score=%d T=%d data=0x%06X\r\n",
|
||||
s_dec.bit_cnt,
|
||||
bit,
|
||||
s_dec.last_high,
|
||||
s_dec.last_low,
|
||||
bit_score,
|
||||
s_dec.t,
|
||||
(unsigned int)s_dec.data);
|
||||
|
||||
if (s_dec.bit_cnt >= RF433_BIT_LEN)
|
||||
{
|
||||
s_dec.frame_score = rf433_calc_frame_score();
|
||||
rf433_update_window_by_score(s_dec.frame_score);
|
||||
|
||||
RF433_DECODER_LOG("[RF433 FRAME] score=%3d T=%2d win=%d lock=%d bits=%2d code=0x%06X addr_h=0x%02X addr_l=0x%02X key=0x%02X\r\n",
|
||||
s_dec.frame_score,
|
||||
s_dec.t,
|
||||
s_dec.window_mode,
|
||||
s_dec.ppl_locked,
|
||||
s_dec.bit_cnt,
|
||||
(unsigned int)s_dec.data,
|
||||
(unsigned int)((s_dec.data >> 16) & 0xFFu),
|
||||
(unsigned int)((s_dec.data >> 8) & 0xFFu),
|
||||
(unsigned int)(s_dec.data & 0xFFu));
|
||||
|
||||
if (s_dec.frame_score >= RF433_FRAME_SCORE_MIN)
|
||||
{
|
||||
rf433_output_code(s_dec.data);
|
||||
}
|
||||
else
|
||||
{
|
||||
RF433_DECODER_LOG("[RF433 BAD] score=%d code=0x%06X\r\n",
|
||||
s_dec.frame_score,
|
||||
(unsigned int)s_dec.data);
|
||||
}
|
||||
|
||||
rf433_decode_reset();
|
||||
rf433_repair_reset();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
#if RF433_DECODER_DEBUG_DETAIL
|
||||
RF433_DETAIL_LOG("[RF433 BIT_ERR] reason=%s idx=%02d high=%d low=%d total=%d T=%d short=%d-%d long=%d-%d data=0x%06X\r\n",
|
||||
rf433_bit_fail_reason(s_dec.last_high, s_dec.last_low),
|
||||
(uint8_t)(s_dec.bit_cnt + 1u),
|
||||
s_dec.last_high,
|
||||
s_dec.last_low,
|
||||
(uint16_t)(s_dec.last_high + s_dec.last_low),
|
||||
s_dec.t,
|
||||
s_dec.short_min,
|
||||
s_dec.short_max,
|
||||
s_dec.long_min,
|
||||
s_dec.long_max,
|
||||
(unsigned int)s_dec.data);
|
||||
#endif
|
||||
rf433_debug_reset("bit", s_dec.last_high, s_dec.last_low);
|
||||
rf433_decode_reset();
|
||||
rf433_repair_reset();
|
||||
}
|
||||
}
|
||||
|
||||
static bool rf433_can_merge_glitch(Rf433Pulse_t a, Rf433Pulse_t b, Rf433Pulse_t c)
|
||||
{
|
||||
if (a.level != c.level)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (b.width > rf433_get_glitch_max())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (a.width == 0u || c.width == 0u)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static void rf433_repair_input_pulse(Rf433Pulse_t pulse)
|
||||
{
|
||||
Rf433Pulse_t merged;
|
||||
Rf433Pulse_t out;
|
||||
|
||||
RF433_PULSE_LOG("[RF433 RAW] L=%d W=%d\r\n", pulse.level, pulse.width);
|
||||
|
||||
if (pulse.width == 0u)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (pulse.width > RF433_LEVEL_TIMEOUT)
|
||||
{
|
||||
rf433_debug_reset("timeout", s_dec.last_high, pulse.width);
|
||||
rf433_decode_reset();
|
||||
rf433_repair_reset();
|
||||
return;
|
||||
}
|
||||
|
||||
if (s_repair.cnt == 0u)
|
||||
{
|
||||
s_repair.p0 = pulse;
|
||||
s_repair.cnt = 1u;
|
||||
return;
|
||||
}
|
||||
|
||||
if (s_repair.cnt == 1u)
|
||||
{
|
||||
s_repair.p1 = pulse;
|
||||
s_repair.cnt = 2u;
|
||||
return;
|
||||
}
|
||||
|
||||
s_repair.p2 = pulse;
|
||||
if (rf433_can_merge_glitch(s_repair.p0, s_repair.p1, s_repair.p2))
|
||||
{
|
||||
merged.level = s_repair.p0.level;
|
||||
merged.width = (uint16_t)(s_repair.p0.width +
|
||||
s_repair.p1.width +
|
||||
s_repair.p2.width);
|
||||
|
||||
RF433_PULSE_LOG("[RF433 MERGE] %d:%d + %d:%d + %d:%d => %d:%d\r\n",
|
||||
s_repair.p0.level,
|
||||
s_repair.p0.width,
|
||||
s_repair.p1.level,
|
||||
s_repair.p1.width,
|
||||
s_repair.p2.level,
|
||||
s_repair.p2.width,
|
||||
merged.level,
|
||||
merged.width);
|
||||
|
||||
s_repair.p0 = merged;
|
||||
s_repair.cnt = 1u;
|
||||
return;
|
||||
}
|
||||
|
||||
out = s_repair.p0;
|
||||
RF433_PULSE_LOG("[RF433 CLEAN] L=%d W=%d\r\n", out.level, out.width);
|
||||
rf433_process_clean_pulse(out);
|
||||
|
||||
s_repair.p0 = s_repair.p1;
|
||||
s_repair.p1 = s_repair.p2;
|
||||
s_repair.cnt = 2u;
|
||||
}
|
||||
|
||||
void rf433_decoder_process(void)
|
||||
{
|
||||
Rf433Pulse_t pulse;
|
||||
uint8_t cnt = 0;
|
||||
|
||||
// // 新增:防重复倒计时全局递减
|
||||
// if(s_dec.anti_repeat_tick > 0)
|
||||
// {
|
||||
// s_dec.anti_repeat_tick--;
|
||||
// }
|
||||
|
||||
|
||||
while ((cnt < RF433_PROCESS_MAX_ONCE) && rf433_fifo_pop(&pulse))
|
||||
{
|
||||
rf433_repair_input_pulse(pulse);
|
||||
cnt++;
|
||||
}
|
||||
}
|
||||
|
||||
bool rf433_decoder_get_frame(Rf433DecoderFrame_t *frame)
|
||||
{
|
||||
if (frame == 0 || !s_dec.frame_ready)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
*frame = s_dec.frame;
|
||||
s_dec.frame_ready = false;
|
||||
return true;
|
||||
}
|
||||
|
||||
uint16_t rf433_decoder_get_lost_count(void)
|
||||
{
|
||||
return s_fifo.lost;
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
#ifndef __RF433_DECODER_H__
|
||||
#define __RF433_DECODER_H__
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#define RF433_DECODER_SAMPLE_US 100u
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint32_t code;
|
||||
uint8_t bit_len;
|
||||
uint8_t addr_h;
|
||||
uint8_t addr_l;
|
||||
uint8_t key;
|
||||
uint8_t score;
|
||||
} Rf433DecoderFrame_t;
|
||||
|
||||
void rf433_decoder_init(void);
|
||||
void rf433_decoder_sample(uint8_t level);
|
||||
void rf433_decoder_process(void);
|
||||
bool rf433_decoder_get_frame(Rf433DecoderFrame_t *frame);
|
||||
uint16_t rf433_decoder_get_lost_count(void);
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,27 @@
|
||||
#ifndef __RF433_DECODER_PORT_H__
|
||||
#define __RF433_DECODER_PORT_H__
|
||||
#include "dbg.h"
|
||||
/*
|
||||
* Project-side configuration for the portable RF433 decoder.
|
||||
* See PORTING.md for Chinese porting instructions.
|
||||
*/
|
||||
#include "xc6xxx.h"
|
||||
#include "rwip_config.h" // stack configuration
|
||||
|
||||
#include "dbg_swdiag.h" // sw profiling definitions
|
||||
|
||||
#include "dbg_trc.h" // debug tracer definition
|
||||
|
||||
#ifndef RF433_DECODER_LOG
|
||||
#define RF433_DECODER_LOG(fmt, ...) LOGI(fmt, ##__VA_ARGS__)
|
||||
#endif
|
||||
|
||||
#ifndef RF433_DECODER_DEBUG_DETAIL
|
||||
#define RF433_DECODER_DEBUG_DETAIL 0
|
||||
#endif
|
||||
|
||||
#ifndef RF433_DECODER_DEBUG_PULSE
|
||||
#define RF433_DECODER_DEBUG_PULSE 0
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -3,7 +3,7 @@
|
||||
#include "timeslice.h"
|
||||
#include "led.h"
|
||||
#include "rf433.h"
|
||||
|
||||
#include "rf433_decoder.h"
|
||||
|
||||
|
||||
uint16_t led_1_count_time=0;
|
||||
@@ -162,8 +162,8 @@ __RAM_CODE void timer1_callback(void *context)
|
||||
|
||||
__RAM_CODE void timer2_callback(void *context)
|
||||
{
|
||||
rf433_receive();
|
||||
|
||||
//rf433_receive();
|
||||
rf433_decoder_sample(RF_DATA);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -5,11 +5,13 @@
|
||||
#include "switch_s.h"
|
||||
#include "ota_flash_interface.h"
|
||||
#include "ota_protocol.h"
|
||||
#include "rf433_decoder.h"
|
||||
TASK_COMPONENTS TaskComps[] =
|
||||
{
|
||||
{0, 50, 50, ble_message_process}, //蓝牙处理任务
|
||||
{0, 1, 1, scan_433} , //遥控处理任务
|
||||
{0, 0, 0, app_op_flash_on},
|
||||
{0, 1, 1, rf433_decoder_process},
|
||||
{0, 10, 10,app_key_scan},
|
||||
{0, 10, 10,ble_mode_scan},
|
||||
{0, 10, 10,trigger_check_process},
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -22,7 +22,7 @@ Dialog DLL: TARMCM1.DLL V1.14.6.0
|
||||
|
||||
<h2>Project:</h2>
|
||||
C:\Users\QJM\Desktop\6517_SDK\XC6XXX系列SDK_20260428\XC65+XC62系列SDK_20260428\project\example\ble\ble_peripheral\mdk\ble_peripheral.uvprojx
|
||||
Project File Date: 07/02/2026
|
||||
Project File Date: 07/03/2026
|
||||
|
||||
<h2>Output:</h2>
|
||||
*** Using Compiler 'V5.06 update 7 (build 960)', folder: 'D:\Keil_v5\ARM\ARMCC\Bin'
|
||||
@@ -31,52 +31,56 @@ assembling startup_xinc.s...
|
||||
compiling system_xinc.c...
|
||||
compiling sleep.c...
|
||||
compiling app_batt.c...
|
||||
compiling usr_server.c...
|
||||
compiling app_sec.c...
|
||||
compiling arch_main.c...
|
||||
..\app\src\arch_main.c(201): warning: #177-D: variable "spi_idx" was declared but never referenced
|
||||
..\app\src\arch_main.c(202): warning: #177-D: variable "spi_idx" was declared but never referenced
|
||||
uint8_t spi_idx=0;
|
||||
..\app\src\arch_main.c(339): warning: #223-D: function "rf_tx_power_set" declared implicitly
|
||||
..\app\src\arch_main.c(341): warning: #223-D: function "rf_tx_power_set" declared implicitly
|
||||
rf_tx_power_set(TRANS_POWER_0_5DBM);
|
||||
..\app\src\arch_main.c: 2 warnings, 0 errors
|
||||
compiling app_sec.c...
|
||||
compiling usr_server.c...
|
||||
compiling aes.c...
|
||||
compiling app_task.c...
|
||||
compiling xc_drv_adc.c...
|
||||
compiling nvds.c...
|
||||
compiling xc_drv_aotimer.c...
|
||||
compiling xc_gap_api.c...
|
||||
compiling xc_drv_bor.c...
|
||||
compiling xc_gatt_client_api.c...
|
||||
compiling nvds.c...
|
||||
compiling xc_gatt_server_api.c...
|
||||
compiling xc_gatt_client_api.c...
|
||||
compiling xc_drv_bor.c...
|
||||
compiling xc_drv_aotimer.c...
|
||||
compiling xc_drv_calib.c...
|
||||
compiling xc_drv_clock.c...
|
||||
compiling xc_drv_dma.c...
|
||||
compiling xc_drv_fmc_spi_dma.c...
|
||||
compiling xc_drv_clock.c...
|
||||
compiling xc_drv_fmc_spi.c...
|
||||
compiling xc_drv_gpio.c...
|
||||
compiling xc_drv_i2c.c...
|
||||
compiling xc_drv_gpio.c...
|
||||
compiling xc_drv_pga.c...
|
||||
compiling xc_drv_pwm.c...
|
||||
compiling xc_drv_pwr.c...
|
||||
compiling xc_drv_qdec.c...
|
||||
compiling xc_drv_pwr.c...
|
||||
compiling xc_drv_rtc.c...
|
||||
compiling xc_drv_spi.c...
|
||||
compiling xc_drv_spi_dma.c...
|
||||
compiling xc_drv_sw_i2c.c...
|
||||
compiling xc_drv_systick.c...
|
||||
compiling xc_drv_uart_dma.c...
|
||||
compiling xc_drv_timer.c...
|
||||
compiling xc_drv_uart.c...
|
||||
compiling xc_drv_uart_dma.c...
|
||||
compiling xc_drv_wdt.c...
|
||||
compiling timer.c...
|
||||
compiling uart_1.c...
|
||||
compiling fmc_spi_1.c...
|
||||
compiling switch_s.c...
|
||||
compiling rf433.c...
|
||||
compiling fmc_spi_1.c...
|
||||
..\app\src\rf433.c(126): warning: #177-D: function "set_click" was declared but never referenced
|
||||
static void set_click(void)
|
||||
..\app\src\rf433.c: 1 warning, 0 errors
|
||||
compiling timeslice.c...
|
||||
compiling key.c...
|
||||
compiling led.c...
|
||||
compiling ota_flash_interface.c...
|
||||
compiling rf433_decoder.c...
|
||||
compiling ota_server.c...
|
||||
compiling ota_protocol.c...
|
||||
..\app\src\ota_protocol.c(149): warning: #550-D: variable "sw_ver" was set but never used
|
||||
@@ -86,35 +90,35 @@ compiling ota_protocol.c...
|
||||
..\app\src\ota_protocol.c: 2 warnings, 0 errors
|
||||
linking...
|
||||
.\Linker\cpu_xip.scat(21): warning: L6329W: Pattern uread4.o(.text) only matches removed unused sections.
|
||||
Program Size: Code=27376 RO-data=1600 RW-data=3008 ZI-data=3076
|
||||
Program Size: Code=28524 RO-data=1784 RW-data=3024 ZI-data=4192
|
||||
Finished: 0 information, 1 warning and 0 error messages.
|
||||
After Build - User command #1: fromelf --bin --output=app.bin .\Objects\Xinc_ble_sdk.axf
|
||||
After Build - User command #2: .\output_tool\Double_ota\ge_ota.bat
|
||||
Size of file: 29096 bytes.
|
||||
all_size=29096
|
||||
size:29096 PageCNT114
|
||||
Size of file: 30432 bytes.
|
||||
all_size=30432
|
||||
size:30432 PageCNT119
|
||||
dual_xip
|
||||
length:29448
|
||||
size:29448
|
||||
length:30728
|
||||
size:30728
|
||||
Addr:12000
|
||||
Size:0x7200
|
||||
Size:0x7700
|
||||
BAddr:0x12000
|
||||
Acheck:0x8569f200
|
||||
Acheck:0x23c95220
|
||||
SoftVer:0x10
|
||||
RomVer:0x20
|
||||
LoadAddr:0x11012000
|
||||
Is xip ota?:1
|
||||
ota_data.bin success已复制 1 个文件。
|
||||
Size of file: 29096 bytes.
|
||||
all_size=29096
|
||||
size:29096 PageCNT114
|
||||
Size of file: 30432 bytes.
|
||||
all_size=30432
|
||||
size:30432 PageCNT119
|
||||
dual_xip
|
||||
length:29448
|
||||
size:29448
|
||||
length:30728
|
||||
size:30728
|
||||
Addr:12000
|
||||
Size:0x7200
|
||||
Size:0x7700
|
||||
BAddr:0x1e000
|
||||
Acheck:0x8569f200
|
||||
Acheck:0x23c95220
|
||||
SoftVer:0x10
|
||||
RomVer:0x20
|
||||
LoadAddr:0x11012000
|
||||
@@ -148,10 +152,10 @@ is_db=1
|
||||
is_th=0
|
||||
需要填充0个sector
|
||||
all_size:1a000
|
||||
size: 29096
|
||||
size: 30432
|
||||
updata file success !
|
||||
已复制 1 个文件。
|
||||
".\Objects\Xinc_ble_sdk.axf" - 0 Error(s), 5 Warning(s).
|
||||
".\Objects\Xinc_ble_sdk.axf" - 0 Error(s), 6 Warning(s).
|
||||
|
||||
<h2>Software Packages used:</h2>
|
||||
|
||||
@@ -164,7 +168,7 @@ Package Vendor: ARM
|
||||
D:/Keil_v5/Packs/ARM/CMSIS/5.9.0/Device/ARM/ARMCM0/Include
|
||||
|
||||
<h2>Collection of Component Files used:</h2>
|
||||
Build Time Elapsed: 00:00:24
|
||||
Build Time Elapsed: 00:00:20
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -47,6 +47,7 @@
|
||||
".\objects\ota_flash_interface.o"
|
||||
".\objects\ota_protocol.o"
|
||||
".\objects\ota_server.o"
|
||||
".\objects\rf433_decoder.o"
|
||||
--strict --scatter ".\Linker\cpu_xip.scat"
|
||||
--feedback fb.txt --summary_stderr --info summarysizes --map --load_addr_map_info --xref --callgraph --symbols
|
||||
--info sizes --info totals --info unused --info veneers
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -138,3 +138,4 @@
|
||||
.\objects\arch_main.o: ..\app\src\switch_s.h
|
||||
.\objects\arch_main.o: ..\app\src\key.h
|
||||
.\objects\arch_main.o: ..\app\src\fmc_spi_1.h
|
||||
.\objects\arch_main.o: ..\app\src\rf433_decoder.h
|
||||
|
||||
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,8 +1,8 @@
|
||||
.\objects\rf433.o: ..\app\src\rf433.c
|
||||
.\objects\rf433.o: ..\app\src\rf433.h
|
||||
.\objects\rf433.o: D:\Keil_v5\ARM\ARMCC\Bin\..\include\stdint.h
|
||||
.\objects\rf433.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_gpio.h
|
||||
.\objects\rf433.o: D:\Keil_v5\ARM\ARMCC\Bin\..\include\stdbool.h
|
||||
.\objects\rf433.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_gpio.h
|
||||
.\objects\rf433.o: D:\Keil_v5\ARM\ARMCC\Bin\..\include\stdio.h
|
||||
.\objects\rf433.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc6xxx.h
|
||||
.\objects\rf433.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc65xx.h
|
||||
@@ -74,3 +74,4 @@
|
||||
.\objects\rf433.o: ..\app\api\rwapp_config.h
|
||||
.\objects\rf433.o: ..\..\..\..\..\component\ble\modules\dbg\api\dbg_swdiag.h
|
||||
.\objects\rf433.o: ..\..\..\..\..\component\ble\modules\dbg\api\dbg_trc.h
|
||||
.\objects\rf433.o: ..\app\src\rf433_decoder.h
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,71 @@
|
||||
.\objects\rf433_decoder.o: ..\app\src\rf433_decoder.c
|
||||
.\objects\rf433_decoder.o: ..\app\src\rf433_decoder.h
|
||||
.\objects\rf433_decoder.o: D:\Keil_v5\ARM\ARMCC\Bin\..\include\stdbool.h
|
||||
.\objects\rf433_decoder.o: D:\Keil_v5\ARM\ARMCC\Bin\..\include\stdint.h
|
||||
.\objects\rf433_decoder.o: ..\app\src\rf433_decoder_port.h
|
||||
.\objects\rf433_decoder.o: ..\..\..\..\..\component\ble\modules\dbg\api\dbg.h
|
||||
.\objects\rf433_decoder.o: ..\..\..\..\..\component\ble\modules\rwip\api\rwip_config.h
|
||||
.\objects\rf433_decoder.o: D:\Keil_v5\ARM\ARMCC\Bin\..\include\string.h
|
||||
.\objects\rf433_decoder.o: ..\..\..\..\..\component\ble\ip\ble\ll\api\rwble_config.h
|
||||
.\objects\rf433_decoder.o: ..\..\..\..\..\component\ble\modules\rwip\api\rwip_config.h
|
||||
.\objects\rf433_decoder.o: ..\..\..\..\..\component\ble\ip\ble\hl\inc\rwble_hl_config.h
|
||||
.\objects\rf433_decoder.o: ..\..\..\..\..\component\ble\ip\ble\hl\api\rwble_hl_error.h
|
||||
.\objects\rf433_decoder.o: ..\..\..\..\..\component\ble\ip\ble\hl\inc\rwprf_config.h
|
||||
.\objects\rf433_decoder.o: ..\app\api\rwapp_config.h
|
||||
.\objects\rf433_decoder.o: ..\..\..\..\..\component\ble\modules\dbg\api\dbg_swdiag.h
|
||||
.\objects\rf433_decoder.o: ..\..\..\..\..\component\ble\modules\dbg\api\dbg_trc.h
|
||||
.\objects\rf433_decoder.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc6xxx.h
|
||||
.\objects\rf433_decoder.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc65xx.h
|
||||
.\objects\rf433_decoder.o: D:\Keil_v5\ARM\ARMCC\Bin\..\include\stdio.h
|
||||
.\objects\rf433_decoder.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\core_cm0.h
|
||||
.\objects\rf433_decoder.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\core_cmInstr.h
|
||||
.\objects\rf433_decoder.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\core_cmFunc.h
|
||||
.\objects\rf433_decoder.o: ..\app\api\sdk_config.h
|
||||
.\objects\rf433_decoder.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_conf.h
|
||||
.\objects\rf433_decoder.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc_m0_register\xc_reg_cpr.h
|
||||
.\objects\rf433_decoder.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc_m0_register\xc_reg_offset.h
|
||||
.\objects\rf433_decoder.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc6xxx.h
|
||||
.\objects\rf433_decoder.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc_m0_register\xc_reg_cprao.h
|
||||
.\objects\rf433_decoder.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc_m0_register\xc_reg_rf.h
|
||||
.\objects\rf433_decoder.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc_m0_register\xc_reg_adc.h
|
||||
.\objects\rf433_decoder.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc_m0_register\xc_reg_aotimer.h
|
||||
.\objects\rf433_decoder.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc_m0_register\xc_reg_dma.h
|
||||
.\objects\rf433_decoder.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc_m0_register\xc_reg_fmc.h
|
||||
.\objects\rf433_decoder.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc_m0_register\xc_reg_fmc_cache.h
|
||||
.\objects\rf433_decoder.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc_m0_register\xc_reg_gpio.h
|
||||
.\objects\rf433_decoder.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc_m0_register\xc_reg_i2c.h
|
||||
.\objects\rf433_decoder.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc_m0_register\xc_reg_qdec.h
|
||||
.\objects\rf433_decoder.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc_m0_register\xc_reg_i2s.h
|
||||
.\objects\rf433_decoder.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc_m0_register\xc_reg_pwm.h
|
||||
.\objects\rf433_decoder.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc_m0_register\xc_reg_pwm_comn.h
|
||||
.\objects\rf433_decoder.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc_m0_register\xc_reg_rtc.h
|
||||
.\objects\rf433_decoder.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc_m0_register\xc_reg_spi.h
|
||||
.\objects\rf433_decoder.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc_m0_register\xc_reg_timer.h
|
||||
.\objects\rf433_decoder.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc_m0_register\xc_reg_uart.h
|
||||
.\objects\rf433_decoder.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc_m0_register\xc_reg_wdt.h
|
||||
.\objects\rf433_decoder.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc_m0_register\xc_reg_pwm_timer.h
|
||||
.\objects\rf433_decoder.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc_m0_register\xc_reg_cdc.h
|
||||
.\objects\rf433_decoder.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_calib.h
|
||||
.\objects\rf433_decoder.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_clock.h
|
||||
.\objects\rf433_decoder.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_systick.h
|
||||
.\objects\rf433_decoder.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_pwr.h
|
||||
.\objects\rf433_decoder.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_gpio.h
|
||||
.\objects\rf433_decoder.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_aotimer.h
|
||||
.\objects\rf433_decoder.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_timer.h
|
||||
.\objects\rf433_decoder.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_rtc.h
|
||||
.\objects\rf433_decoder.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_uart.h
|
||||
.\objects\rf433_decoder.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\ringbuffer.h
|
||||
.\objects\rf433_decoder.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_dma.h
|
||||
.\objects\rf433_decoder.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_spi.h
|
||||
.\objects\rf433_decoder.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_flash.h
|
||||
.\objects\rf433_decoder.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_spi_dma.h
|
||||
.\objects\rf433_decoder.o: D:\Keil_v5\ARM\ARMCC\Bin\..\include\stdlib.h
|
||||
.\objects\rf433_decoder.o: ..\..\..\..\..\component\ble\modules\flash\xc6xxx_fmc_spi.h
|
||||
.\objects\rf433_decoder.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_fmc_spi_dma.h
|
||||
.\objects\rf433_decoder.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_uart_dma.h
|
||||
.\objects\rf433_decoder.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_i2c.h
|
||||
.\objects\rf433_decoder.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_sw_i2c.h
|
||||
.\objects\rf433_decoder.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_wdt.h
|
||||
.\objects\rf433_decoder.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_adc.h
|
||||
.\objects\rf433_decoder.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_pwm.h
|
||||
.\objects\rf433_decoder.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_bor.h
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -62,3 +62,4 @@
|
||||
.\objects\timer.o: ..\app\src\timeslice.h
|
||||
.\objects\timer.o: ..\app\src\led.h
|
||||
.\objects\timer.o: ..\app\src\rf433.h
|
||||
.\objects\timer.o: ..\app\src\rf433_decoder.h
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -103,3 +103,4 @@
|
||||
.\objects\timeslice.o: ..\..\..\..\..\component\ble\plf\refip\src\build\ble-full\reg\fw\_reg_em_ble_rx_cte_desc.h
|
||||
.\objects\timeslice.o: ..\..\..\..\..\component\ble\plf\refip\src\build\ble-full\reg\fw\_reg_em_ble_wpal.h
|
||||
.\objects\timeslice.o: ..\..\..\..\..\component\ble\plf\refip\src\build\ble-full\reg\fw\_reg_em_ble_ral.h
|
||||
.\objects\timeslice.o: ..\app\src\rf433_decoder.h
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
@@ -1095,6 +1095,42 @@
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>6</GroupNumber>
|
||||
<FileNumber>62</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\app\src\rf433_decoder.c</PathWithFileName>
|
||||
<FilenameWithoutPath>rf433_decoder.c</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>6</GroupNumber>
|
||||
<FileNumber>63</FileNumber>
|
||||
<FileType>5</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\app\src\rf433_decoder.h</PathWithFileName>
|
||||
<FilenameWithoutPath>rf433_decoder.h</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>6</GroupNumber>
|
||||
<FileNumber>64</FileNumber>
|
||||
<FileType>5</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\app\src\rf433_decoder_port.h</PathWithFileName>
|
||||
<FilenameWithoutPath>rf433_decoder_port.h</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
</Group>
|
||||
|
||||
</ProjectOpt>
|
||||
|
||||
@@ -765,6 +765,21 @@
|
||||
<FileType>5</FileType>
|
||||
<FilePath>..\app\src\ota_server.h</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>rf433_decoder.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\app\src\rf433_decoder.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>rf433_decoder.h</FileName>
|
||||
<FileType>5</FileType>
|
||||
<FilePath>..\app\src\rf433_decoder.h</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>rf433_decoder_port.h</FileName>
|
||||
<FileType>5</FileType>
|
||||
<FilePath>..\app\src\rf433_decoder_port.h</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
</Group>
|
||||
</Groups>
|
||||
@@ -1477,6 +1492,21 @@
|
||||
<FileType>5</FileType>
|
||||
<FilePath>..\app\src\ota_server.h</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>rf433_decoder.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\app\src\rf433_decoder.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>rf433_decoder.h</FileName>
|
||||
<FileType>5</FileType>
|
||||
<FilePath>..\app\src\rf433_decoder.h</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>rf433_decoder_port.h</FileName>
|
||||
<FileType>5</FileType>
|
||||
<FilePath>..\app\src\rf433_decoder_port.h</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
</Group>
|
||||
</Groups>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
;#<FEEDBACK># ARM Linker, 5060960: Last Updated: Fri Jul 03 16:02:05 2026
|
||||
;#<FEEDBACK># ARM Linker, 5060960: Last Updated: Thu Jul 09 18:43:35 2026
|
||||
;VERSION 0.2
|
||||
;FILE aes.o
|
||||
__asm___5_aes_c____REV16 <= USED 0
|
||||
@@ -67,6 +67,11 @@ ota_svc_cb_event_sent <= USED 0
|
||||
;FILE rf433.o
|
||||
__asm___7_rf433_c_adress_H____REV16 <= USED 0
|
||||
__asm___7_rf433_c_adress_H____REVSH <= USED 0
|
||||
rf433_receive <= USED 0
|
||||
;FILE rf433_decoder.o
|
||||
__asm___15_rf433_decoder_c_5ba30fd7____REV16 <= USED 0
|
||||
__asm___15_rf433_decoder_c_5ba30fd7____REVSH <= USED 0
|
||||
rf433_decoder_get_lost_count <= USED 0
|
||||
;FILE sleep.o
|
||||
__asm___7_sleep_c_efd8dd31____REV16 <= USED 0
|
||||
__asm___7_sleep_c_efd8dd31____REVSH <= USED 0
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user