Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a1b914709d | |||
| cbb03c9d9c | |||
| 5e921a1546 | |||
| f71c3f4124 | |||
| ee68f37f04 | |||
| 99d4844c01 | |||
| 6d114add28 |
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -397,7 +397,7 @@
|
||||
|
||||
|
||||
/// Default Device Name
|
||||
#define APP_DFLT_DEVICE_NAME ("DWM22") //
|
||||
#define APP_DFLT_DEVICE_NAME ("PWM32EPRO") //
|
||||
#define APP_DFLT_DEVICE_NAME_LEN (sizeof(APP_DFLT_DEVICE_NAME))
|
||||
#define APP_DFLT_DEVICE_NAME_LEN1 (sizeof(APP_DFLT_DEVICE_NAME1))
|
||||
#define APP_DFLT_DEVICE_NAME2 ("Second_test")
|
||||
|
||||
@@ -188,7 +188,10 @@ void scan_433();
|
||||
void Lock_Pwm7xd();
|
||||
void Delay_50us();
|
||||
void Encoder_key();
|
||||
void rf433_clear_code(void);
|
||||
uint8_t rf433_start_pairing(void);
|
||||
void rf433_cancel_pairing(void);
|
||||
uint8_t rf433_paired_count(void);
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "pwm.h"
|
||||
#include "rf433_decoder.h"
|
||||
#include "timeslice.h"
|
||||
#include "usr_server.h"
|
||||
union rf433_flag rf_flag = {0};
|
||||
unsigned char high_level_time;
|
||||
unsigned char low_level_time;
|
||||
@@ -96,13 +97,19 @@ static uint8_t pair_deferred_command;
|
||||
static uint8_t pair_deferred_res_data;
|
||||
static uint32_t pair_deferred_receive_data;
|
||||
static uint8_t pair_command_replay;
|
||||
static uint8_t app_pairing_requested;
|
||||
|
||||
#define PAIR_HOLD_FRAME_COUNT 4U
|
||||
#define PAIR_FRAME_SILENCE_TICKS 100U
|
||||
#define PAIRING_WINDOW_TICKS 50000UL
|
||||
#define RF433_RELEASE_TIMEOUT_TICKS 1500U
|
||||
#define RF433_MS_TO_SAMPLE_TICKS(ms) ((uint16_t)((ms) * (1000U / RF433_DECODER_SAMPLE_US)))
|
||||
#define RF433_MODE_REPEAT_TICKS ((uint32_t)RF433_MS_TO_SAMPLE_TICKS(500U))
|
||||
uint8_t long_flag_s=0;
|
||||
static volatile uint32_t rf433_sample_ticks;
|
||||
static uint32_t rf433_mode_last_action_tick;
|
||||
static uint8_t rf433_mode_last_key;
|
||||
static uint8_t rf433_mode_action_valid;
|
||||
|
||||
void _433_fun(void);
|
||||
|
||||
@@ -253,12 +260,84 @@ static void Pairing_Candidate_Reset(void)
|
||||
pair_deferred_command = 0U;
|
||||
}
|
||||
|
||||
uint8_t rf433_paired_count(void)
|
||||
{
|
||||
uint8_t count = 0U;
|
||||
uint8_t i;
|
||||
|
||||
for(i = 0U; i < 5U; i++)
|
||||
{
|
||||
if(!Pairing_Address_IsEmpty(adress_H_array[i], adress_L_array[i]))
|
||||
count++;
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
uint8_t rf433_start_pairing(void)
|
||||
{
|
||||
if(pairing_feedback_active)
|
||||
{
|
||||
ble_remote_event_notify(0x0DU, 0U, rf433_paired_count());
|
||||
return 0U;
|
||||
}
|
||||
|
||||
ssse = 0U;
|
||||
time_5s = 1U;
|
||||
pair_last_frame_sequence = rf_frame_sequence;
|
||||
Pairing_Candidate_Reset();
|
||||
app_pairing_requested = 1U;
|
||||
ble_remote_event_notify(0x0DU, 1U, rf433_paired_count());
|
||||
return 1U;
|
||||
}
|
||||
|
||||
void rf433_cancel_pairing(void)
|
||||
{
|
||||
ssse = 1U;
|
||||
time_5s = PAIRING_WINDOW_TICKS + 1U;
|
||||
Pairing_Candidate_Reset();
|
||||
if(app_pairing_requested)
|
||||
{
|
||||
app_pairing_requested = 0U;
|
||||
ble_remote_event_notify(0x0DU, 0U, rf433_paired_count());
|
||||
}
|
||||
}
|
||||
|
||||
void rf433_clear_code(void)
|
||||
{
|
||||
uint8_t i;
|
||||
|
||||
for(i = 0U; i < 5U; i++)
|
||||
{
|
||||
adress_H_array[i] = 0xffU;
|
||||
adress_L_array[i] = 0xffU;
|
||||
}
|
||||
|
||||
adress = 0U;
|
||||
adress_H = 0U;
|
||||
adress_L = 0U;
|
||||
match_success = 0U;
|
||||
ssse = 1U;
|
||||
time_5s = PAIRING_WINDOW_TICKS + 1U;
|
||||
Pairing_Candidate_Reset();
|
||||
Pairing_Feedback_Start(200U);
|
||||
app_pairing_requested = 0U;
|
||||
set_TaskComps_timer(2U, 2000U);
|
||||
ble_remote_event_notify(0x0EU, 1U, 0U);
|
||||
}
|
||||
|
||||
|
||||
|
||||
static void Encoder_key_NoCode(){
|
||||
uint16_t times_s=0;
|
||||
uint8_t pairing_data_changed=0U;
|
||||
|
||||
if(app_pairing_requested &&
|
||||
(ssse != 0U || time_5s > PAIRING_WINDOW_TICKS))
|
||||
{
|
||||
app_pairing_requested = 0U;
|
||||
ble_remote_event_notify(0x0DU, 0U, rf433_paired_count());
|
||||
}
|
||||
|
||||
if(pair_frame_silence_ticks < 0xffU) pair_frame_silence_ticks++;
|
||||
if(pair_frame_silence_ticks > PAIR_FRAME_SILENCE_TICKS)
|
||||
{
|
||||
@@ -357,6 +436,17 @@ static void Encoder_key_NoCode(){
|
||||
|
||||
ssse=1;
|
||||
if(pairing_data_changed) set_TaskComps_timer(2,2000);
|
||||
if(app_pairing_requested)
|
||||
{
|
||||
app_pairing_requested = 0U;
|
||||
if(res_data==Brightness_H ||
|
||||
res_data==B_Brightness_H ||
|
||||
res_data==F_Brightness_10)
|
||||
ble_remote_event_notify(0x0DU, 2U,
|
||||
rf433_paired_count());
|
||||
else
|
||||
ble_remote_event_notify(0x0EU, 1U, 0U);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -401,8 +491,38 @@ static void set_click(){
|
||||
}
|
||||
}
|
||||
|
||||
static uint8_t rf433_is_mode_step_command(uint8_t command)
|
||||
{
|
||||
return command == Mode_add || command == Mode_dow;
|
||||
}
|
||||
|
||||
/*
|
||||
* Act immediately on the first valid mode frame. Repeated frames carrying
|
||||
* the same key are accepted at most once every 500 ms. Keep this independent
|
||||
* from the generic 150 ms release detector so an occasional missing RF frame
|
||||
* cannot turn one physical hold into several rapid short presses.
|
||||
*/
|
||||
static uint8_t rf433_mode_step_ready(uint8_t command)
|
||||
{
|
||||
uint32_t now = rf433_sample_ticks;
|
||||
|
||||
if(!rf433_mode_action_valid ||
|
||||
rf433_mode_last_key != command ||
|
||||
(uint32_t)(now - rf433_mode_last_action_tick) >=
|
||||
RF433_MODE_REPEAT_TICKS)
|
||||
{
|
||||
rf433_mode_last_key = command;
|
||||
rf433_mode_last_action_tick = now;
|
||||
rf433_mode_action_valid = 1U;
|
||||
return 1U;
|
||||
}
|
||||
|
||||
return 0U;
|
||||
}
|
||||
|
||||
void rf433_receive(void)//RF433 sample, called every 100 us
|
||||
{
|
||||
rf433_sample_ticks++;
|
||||
rf433_decoder_sample((RF_DATA == HIGH_LEVEL) ? 1U : 0U);
|
||||
|
||||
if(long_time > 0U)
|
||||
@@ -452,8 +572,15 @@ void _433_fun(){
|
||||
pair_deferred_receive_data = receive_data;
|
||||
return;
|
||||
}
|
||||
if(rf433_is_mode_step_command(res_data))
|
||||
{
|
||||
if(!rf433_mode_step_ready(res_data)) return;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(Key_TypeDef.KEY_STATE_Click==1||KEY_STATE_re==1) return;
|
||||
set_click();
|
||||
}
|
||||
switch(res_data){
|
||||
//椭圆
|
||||
case ON://单击
|
||||
@@ -564,4 +691,3 @@ void scan_433(){
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -57,6 +57,7 @@
|
||||
#include "mode.h"
|
||||
#include "RF433.h"
|
||||
#include "rf433_decoder.h"
|
||||
#include "external_key.h"
|
||||
#include "rgblight.h"
|
||||
#include "timer.h"
|
||||
#include "fmc_spi.h"
|
||||
@@ -389,7 +390,6 @@ int main(void)
|
||||
#endif
|
||||
|
||||
|
||||
wdt_init();
|
||||
/* Set the broadcast address of the device. */
|
||||
board_init();
|
||||
xc_fmc_spi_init_oprt( );
|
||||
@@ -397,6 +397,8 @@ int main(void)
|
||||
|
||||
fmc_spi_read();
|
||||
power_restore_apply_on_boot();
|
||||
/* Start the watchdog after the optional boot-time Flash update. */
|
||||
wdt_init();
|
||||
timer0_2_init();
|
||||
bluetooth_init();
|
||||
|
||||
@@ -450,8 +452,10 @@ int main(void)
|
||||
#endif
|
||||
// gpio_pullup_input_inter_test();
|
||||
adc_Init();
|
||||
rf433_decoder_init();
|
||||
/* Keep RF433 GPIO initialization after the other input setup. */
|
||||
rf433_gpio_init();
|
||||
/* Clear any startup transition pulses after RF433 GPIO is stable. */
|
||||
rf433_decoder_init();
|
||||
while (1){
|
||||
//DEBUG("222\r\n");
|
||||
//printf("ddd=%d---%d---%d\r\n",W_PWM_duty,C_PWM_duty,(2*deadTime));
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
* Dual-color output uses one fixed 500 us frame:
|
||||
* OFF -> W pulse -> OFF -> C pulse -> OFF to frame end.
|
||||
* The available OFF time is distributed around both direction changes and
|
||||
* each W/C transition retains at least 25 us protection.
|
||||
* each W/C transition retains at least 50 us protection.
|
||||
* Normal dual-color output produces one pulse per color per frame (2 kHz).
|
||||
* Only the low-output neutral section of three-color breathing uses PDM.
|
||||
*/
|
||||
@@ -24,8 +24,8 @@
|
||||
#define BRIDGE_PWM_PERIOD 6U
|
||||
#define BRIDGE_MIX_SCALE 1000U
|
||||
#define BRIDGE_FRAME_US 500U
|
||||
#define BRIDGE_DEADTIME_US 25U
|
||||
#define BRIDGE_DUAL_ACTIVE_US 450U
|
||||
#define BRIDGE_DEADTIME_US 50U
|
||||
#define BRIDGE_DUAL_ACTIVE_US 400U
|
||||
#define BRIDGE_MIN_DUAL_PULSE_US 1U
|
||||
#define BRIDGE_NEUTRAL_PDM_PULSE_US 50U
|
||||
#define BRIDGE_TIMER_TICKS_PER_US 16U
|
||||
@@ -521,15 +521,13 @@ __RAM_CODE void Bridge_Service_1ms(void)
|
||||
pwm_duty = (uint16_t)((total * BRIDGE_PWM_SCALE +
|
||||
(BRIDGE_MIX_SCALE / 2U)) / BRIDGE_MIX_SCALE);
|
||||
/*
|
||||
* A mixed H-bridge frame has 450 us of active time after deadtime.
|
||||
* Use the same 450/500 energy at both single-color endpoints of the
|
||||
* continuous gradient so its total brightness does not jump there.
|
||||
* Use the same 400 us maximum energy as mixed light for every
|
||||
* single-color output. Switching between the hardware-PWM and
|
||||
* Timer3 mixed-light paths therefore does not change total energy.
|
||||
*/
|
||||
if (Mode == mode3 && choose_mode_falsg == 7U) {
|
||||
pwm_duty = (uint16_t)(
|
||||
((uint32_t)pwm_duty * BRIDGE_DUAL_ACTIVE_US +
|
||||
(BRIDGE_FRAME_US / 2U)) / BRIDGE_FRAME_US);
|
||||
}
|
||||
|
||||
if (output_mode == BRIDGE_MODE_SINGLE &&
|
||||
active_state == single_state &&
|
||||
@@ -552,26 +550,12 @@ __RAM_CODE void Bridge_Service_1ms(void)
|
||||
if (cached_w_mix != w_mix || cached_c_mix != c_mix ||
|
||||
output_mode != BRIDGE_MODE_DUAL) {
|
||||
/*
|
||||
* Keep 50 us OFF at maximum dual-color brightness. The OFF time is
|
||||
* split evenly between W->C and C->W, which both absorbs interrupt
|
||||
* latency and spreads the two optical pulses across the 500 us frame.
|
||||
* Keep 100 us OFF at maximum dual-color brightness. The OFF time is
|
||||
* split evenly into 50 us for W->C and 50 us for C->W. This absorbs
|
||||
* interrupt latency and spreads both optical pulses across the frame.
|
||||
*/
|
||||
if (Mode == mode3 && choose_mode_falsg == 8U) {
|
||||
/*
|
||||
* The overlap gradient intentionally carries only 40% combined
|
||||
* output through its crossover. Base that section on the complete
|
||||
* 500 us frame so entering/leaving dual output does not create a
|
||||
* 10% brightness step. The 450 us safety ceiling still applies.
|
||||
*/
|
||||
total_on_us = (BRIDGE_FRAME_US * total +
|
||||
(BRIDGE_MIX_SCALE / 2U)) / BRIDGE_MIX_SCALE;
|
||||
if (total_on_us > BRIDGE_DUAL_ACTIVE_US) {
|
||||
total_on_us = BRIDGE_DUAL_ACTIVE_US;
|
||||
}
|
||||
} else {
|
||||
total_on_us = (BRIDGE_DUAL_ACTIVE_US * total +
|
||||
(BRIDGE_MIX_SCALE / 2U)) / BRIDGE_MIX_SCALE;
|
||||
}
|
||||
/* Keep a non-zero timer interval without imposing a brightness floor. */
|
||||
if (total_on_us < (2U * BRIDGE_MIN_DUAL_PULSE_US)) {
|
||||
total_on_us = 2U * BRIDGE_MIN_DUAL_PULSE_US;
|
||||
|
||||
@@ -0,0 +1,278 @@
|
||||
#include "external_key.h"
|
||||
#include "xc_drv_gpio.h"
|
||||
#include "Mode.h"
|
||||
#include "PWM.h"
|
||||
#include "RF433.h"
|
||||
#include "timer.h"
|
||||
#include "timeslice.h"
|
||||
|
||||
#define EXTERNAL_KEY_PIN GPIO_5
|
||||
#define EXTERNAL_KEY_PRESSED_LEVEL GPIO_PIN_RESET
|
||||
|
||||
/* external_key_scan is called every 10 ms. */
|
||||
#define EXT_KEY_DEBOUNCE_TICKS 2U
|
||||
#define EXT_KEY_DOUBLE_TICKS 15U
|
||||
#define EXT_KEY_LONG_TICKS 40U
|
||||
#define EXT_KEY_BRIGHTNESS_STEP_TICKS 5U
|
||||
#define EXT_KEY_SPEED_STEP_TICKS 15U
|
||||
#define EXT_KEY_CLEAR_CODE_TICKS 3000U
|
||||
|
||||
#define EXT_KEY_BRIGHTNESS_STEP 3U
|
||||
#define EXT_KEY_SPEED_STEP 1U
|
||||
#define EXT_KEY_SAVE_DELAY_MS 1000U
|
||||
|
||||
typedef enum
|
||||
{
|
||||
EXT_KEY_IDLE = 0,
|
||||
EXT_KEY_DOWN,
|
||||
EXT_KEY_WAIT_SECOND,
|
||||
EXT_KEY_SECOND_DOWN,
|
||||
EXT_KEY_LONG
|
||||
} EXT_KEY_STATE;
|
||||
|
||||
static EXT_KEY_STATE ext_key_state = EXT_KEY_IDLE;
|
||||
static uint16_t ext_key_press_ticks;
|
||||
static uint16_t ext_key_wait_ticks;
|
||||
static uint16_t ext_key_step_ticks;
|
||||
static uint8_t ext_key_direction_up = 1U;
|
||||
static uint8_t ext_key_adjust_speed;
|
||||
static uint8_t ext_key_clear_triggered;
|
||||
|
||||
static uint8_t external_key_is_pressed(void)
|
||||
{
|
||||
return xc_gpio_read_pin(EXTERNAL_KEY_PIN) ==
|
||||
EXTERNAL_KEY_PRESSED_LEVEL;
|
||||
}
|
||||
|
||||
static void external_key_save_later(void)
|
||||
{
|
||||
set_TaskComps_timer(2U, EXT_KEY_SAVE_DELAY_MS);
|
||||
}
|
||||
|
||||
static void external_key_power_toggle(void)
|
||||
{
|
||||
if(deviceStatus == POWEROFF)
|
||||
Start_PWM();
|
||||
else
|
||||
Stop_PWM();
|
||||
|
||||
external_key_save_later();
|
||||
}
|
||||
|
||||
static void external_key_mode_next(void)
|
||||
{
|
||||
if(deviceStatus == POWEROFF)
|
||||
Start_PWM();
|
||||
|
||||
if(choose_mode_falsg >= EFFECT_MODE_MAX)
|
||||
choose_mode_falsg = EFFECT_MODE_MIN;
|
||||
else
|
||||
choose_mode_falsg++;
|
||||
|
||||
choose_mode_bh = 0U;
|
||||
startTimer(&timer1, 1U);
|
||||
external_key_save_later();
|
||||
}
|
||||
|
||||
static void external_key_brightness_step(void)
|
||||
{
|
||||
if(ext_key_direction_up)
|
||||
{
|
||||
if(Brightness >=
|
||||
(BRIGHTNESS_MAX_PERCENT - EXT_KEY_BRIGHTNESS_STEP))
|
||||
Brightness = BRIGHTNESS_MAX_PERCENT;
|
||||
else
|
||||
Brightness += EXT_KEY_BRIGHTNESS_STEP;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(Brightness <=
|
||||
(BRIGHTNESS_MIN_PERCENT + EXT_KEY_BRIGHTNESS_STEP))
|
||||
Brightness = BRIGHTNESS_MIN_PERCENT;
|
||||
else
|
||||
Brightness -= EXT_KEY_BRIGHTNESS_STEP;
|
||||
}
|
||||
}
|
||||
|
||||
static void external_key_speed_step(void)
|
||||
{
|
||||
/*
|
||||
* A smaller Speed value is faster in the current effect tables.
|
||||
* Keep the same direction convention used by DWM11.
|
||||
*/
|
||||
if(ext_key_direction_up)
|
||||
{
|
||||
if(Speed > SPEED_MIN_LEVEL)
|
||||
Speed -= EXT_KEY_SPEED_STEP;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(Speed < SPEED_MAX_LEVEL)
|
||||
Speed += EXT_KEY_SPEED_STEP;
|
||||
}
|
||||
}
|
||||
|
||||
static void external_key_adjust_step(void)
|
||||
{
|
||||
if(deviceStatus == POWEROFF)
|
||||
Start_PWM();
|
||||
|
||||
if(ext_key_adjust_speed)
|
||||
external_key_speed_step();
|
||||
else
|
||||
external_key_brightness_step();
|
||||
}
|
||||
|
||||
static void external_key_long_start(void)
|
||||
{
|
||||
ext_key_adjust_speed = (Mode == mode0) ? 0U : 1U;
|
||||
ext_key_step_ticks = 0U;
|
||||
external_key_adjust_step();
|
||||
}
|
||||
|
||||
static void external_key_long_stop(void)
|
||||
{
|
||||
if(ext_key_clear_triggered)
|
||||
{
|
||||
ext_key_clear_triggered = 0U;
|
||||
ext_key_adjust_speed = 0U;
|
||||
return;
|
||||
}
|
||||
|
||||
external_key_save_later();
|
||||
ext_key_direction_up = ext_key_direction_up ? 0U : 1U;
|
||||
ext_key_adjust_speed = 0U;
|
||||
}
|
||||
|
||||
void external_key_init(void)
|
||||
{
|
||||
GPIO_InitCfg_t gpio_cfg = {0};
|
||||
|
||||
gpio_cfg.Mux = GPIO_Mux0;
|
||||
gpio_cfg.FunSel = GPIO_Dx;
|
||||
gpio_cfg.Pull = GPIO_PULLUP;
|
||||
gpio_cfg.Dir = GPIO_DIR_INPUT;
|
||||
gpio_cfg.Int = NOT_INT;
|
||||
gpio_cfg.Pin = EXTERNAL_KEY_PIN;
|
||||
xc_gpio_init(&gpio_cfg);
|
||||
}
|
||||
|
||||
void external_key_scan(void)
|
||||
{
|
||||
uint8_t pressed = external_key_is_pressed();
|
||||
uint16_t step_period;
|
||||
|
||||
switch(ext_key_state)
|
||||
{
|
||||
case EXT_KEY_IDLE:
|
||||
if(pressed)
|
||||
{
|
||||
ext_key_press_ticks = 1U;
|
||||
ext_key_step_ticks = 0U;
|
||||
ext_key_clear_triggered = 0U;
|
||||
ext_key_state = EXT_KEY_DOWN;
|
||||
}
|
||||
break;
|
||||
|
||||
case EXT_KEY_DOWN:
|
||||
if(pressed)
|
||||
{
|
||||
if(ext_key_press_ticks < 0xFFFFU)
|
||||
ext_key_press_ticks++;
|
||||
|
||||
if(ext_key_press_ticks >= EXT_KEY_LONG_TICKS)
|
||||
{
|
||||
external_key_long_start();
|
||||
ext_key_state = EXT_KEY_LONG;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(ext_key_press_ticks >= EXT_KEY_DEBOUNCE_TICKS)
|
||||
{
|
||||
ext_key_wait_ticks = 0U;
|
||||
ext_key_state = EXT_KEY_WAIT_SECOND;
|
||||
}
|
||||
else
|
||||
{
|
||||
ext_key_state = EXT_KEY_IDLE;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case EXT_KEY_WAIT_SECOND:
|
||||
if(pressed)
|
||||
{
|
||||
ext_key_press_ticks = 1U;
|
||||
ext_key_step_ticks = 0U;
|
||||
ext_key_clear_triggered = 0U;
|
||||
ext_key_state = EXT_KEY_SECOND_DOWN;
|
||||
}
|
||||
else
|
||||
{
|
||||
ext_key_wait_ticks++;
|
||||
if(ext_key_wait_ticks >= EXT_KEY_DOUBLE_TICKS)
|
||||
{
|
||||
external_key_power_toggle();
|
||||
ext_key_state = EXT_KEY_IDLE;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case EXT_KEY_SECOND_DOWN:
|
||||
if(pressed)
|
||||
{
|
||||
if(ext_key_press_ticks < 0xFFFFU)
|
||||
ext_key_press_ticks++;
|
||||
|
||||
if(ext_key_press_ticks >= EXT_KEY_LONG_TICKS)
|
||||
{
|
||||
external_key_long_start();
|
||||
ext_key_state = EXT_KEY_LONG;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(ext_key_press_ticks >= EXT_KEY_DEBOUNCE_TICKS)
|
||||
external_key_mode_next();
|
||||
ext_key_state = EXT_KEY_IDLE;
|
||||
}
|
||||
break;
|
||||
|
||||
case EXT_KEY_LONG:
|
||||
if(pressed)
|
||||
{
|
||||
if(ext_key_press_ticks < 0xFFFFU)
|
||||
ext_key_press_ticks++;
|
||||
|
||||
if(!ext_key_clear_triggered &&
|
||||
ext_key_press_ticks >= EXT_KEY_CLEAR_CODE_TICKS)
|
||||
{
|
||||
ext_key_clear_triggered = 1U;
|
||||
rf433_clear_code();
|
||||
}
|
||||
else if(!ext_key_clear_triggered)
|
||||
{
|
||||
step_period = ext_key_adjust_speed ?
|
||||
EXT_KEY_SPEED_STEP_TICKS :
|
||||
EXT_KEY_BRIGHTNESS_STEP_TICKS;
|
||||
ext_key_step_ticks++;
|
||||
if(ext_key_step_ticks >= step_period)
|
||||
{
|
||||
ext_key_step_ticks = 0U;
|
||||
external_key_adjust_step();
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
external_key_long_stop();
|
||||
ext_key_state = EXT_KEY_IDLE;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
ext_key_state = EXT_KEY_IDLE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
#ifndef _EXTERNAL_KEY_H_
|
||||
#define _EXTERNAL_KEY_H_
|
||||
|
||||
void external_key_init(void);
|
||||
void external_key_scan(void);
|
||||
|
||||
#endif
|
||||
@@ -289,14 +289,9 @@ void power_restore_apply_on_boot(void)
|
||||
power_cycle_next_mode = (uint8_t)((mode_index + 1U) % 3U);
|
||||
|
||||
/*
|
||||
* Save the next startup mode before timers, BLE and the H-bridge start.
|
||||
* A deferred flash erase/write masks interrupts long enough to stretch
|
||||
* one Timer3-controlled dual-color pulse and causes a visible flash.
|
||||
* Cycle-static is also a remembered state. Start PWM, BLE and the
|
||||
* H-bridge through the same path as full-memory restore, then persist
|
||||
* the next static mode through the normal deferred Flash state machine.
|
||||
*/
|
||||
wright_user_data();
|
||||
GLOBAL_INT_DISABLE();
|
||||
xc_fmc_spi_flash_erase_page(USER_DATA_FLASH_ADDR);
|
||||
xc_fmc_spi_flash_write_page(USER_DATA_FLASH_ADDR,
|
||||
app_data, FLASH_PAGE_SIZE);
|
||||
GLOBAL_INT_RESTORE();
|
||||
set_TaskComps_timer(2U, POWER_POLICY_SAVE_DELAY_MS);
|
||||
}
|
||||
|
||||
@@ -9,7 +9,11 @@ volatile uint32_t Light_Transition_C_Output_Q12;
|
||||
|
||||
#define BRIGHTNESS_SMOOTH_SHIFT 4U
|
||||
#define OUTPUT_SMOOTH_SHIFT 4U
|
||||
#define MODE_TRANSITION_TICKS 40U
|
||||
#define MODE_TRANSITION_TICKS 100U
|
||||
#define CCT_RING_TRANSITION_TICKS 40U
|
||||
#define TRANSITION_CURVE_LINEAR 0U
|
||||
#define TRANSITION_CURVE_GAMMA_S 1U
|
||||
#define TRANSITION_CURVE_GAMMA_OUT 2U
|
||||
#define LIGHT_OUTPUT_SCALE 1000U
|
||||
#define BREATH_MIN_OUTPUT (LIGHT_OUTPUT_SCALE / 100U)
|
||||
#define DUAL_MIN_STABLE_CHANNEL_OUTPUT 102U
|
||||
@@ -78,6 +82,29 @@ static const uint16_t power_fade_gamma_q12[101] = {
|
||||
4096U
|
||||
};
|
||||
|
||||
/*
|
||||
* Symmetric Gamma 1.8 transition curve:
|
||||
* q = p^1.8 / (p^1.8 + (1-p)^1.8)
|
||||
*
|
||||
* Unlike applying Gamma independently to W and C, q and (1-q) remain
|
||||
* complementary. The transition therefore eases in and out without causing
|
||||
* a brightness dip in the middle. A table keeps the 5 ms task free of
|
||||
* floating-point and power calculations.
|
||||
*/
|
||||
static const uint16_t transition_gamma_s_q12[101] = {
|
||||
0U, 1U, 4U, 8U, 13U, 20U, 29U, 39U, 50U, 63U,
|
||||
77U, 93U, 110U, 130U, 150U, 173U, 197U, 223U, 251U, 281U,
|
||||
312U, 345U, 381U, 418U, 457U, 498U, 541U, 586U, 633U, 681U,
|
||||
732U, 784U, 839U, 895U, 953U, 1012U, 1073U, 1136U, 1200U, 1265U,
|
||||
1332U, 1400U, 1469U, 1539U, 1610U, 1682U, 1754U, 1827U, 1901U, 1974U,
|
||||
2048U, 2122U, 2195U, 2269U, 2342U, 2414U, 2486U, 2557U, 2627U, 2696U,
|
||||
2764U, 2831U, 2896U, 2960U, 3023U, 3084U, 3143U, 3201U, 3257U, 3312U,
|
||||
3364U, 3415U, 3463U, 3510U, 3555U, 3598U, 3639U, 3678U, 3715U, 3751U,
|
||||
3784U, 3815U, 3845U, 3873U, 3899U, 3923U, 3946U, 3966U, 3986U, 4003U,
|
||||
4019U, 4033U, 4046U, 4057U, 4067U, 4076U, 4083U, 4088U, 4092U, 4095U,
|
||||
4096U
|
||||
};
|
||||
|
||||
static uint16_t current_brightness_q12;
|
||||
static uint16_t power_fade_progress_q12;
|
||||
static uint16_t power_fade_remainder;
|
||||
@@ -86,6 +113,8 @@ static uint8_t transition_sync_pending;
|
||||
static uint16_t mode_transition_start_w;
|
||||
static uint16_t mode_transition_start_c;
|
||||
static uint8_t mode_transition_tick;
|
||||
static uint8_t mode_transition_total_ticks;
|
||||
static uint8_t mode_transition_gamma_curve;
|
||||
static volatile uint8_t feedback_active;
|
||||
static volatile uint8_t feedback_on;
|
||||
|
||||
@@ -153,24 +182,54 @@ static uint16_t approach_target(uint16_t current, uint16_t target)
|
||||
return current - step;
|
||||
}
|
||||
|
||||
static uint16_t transition_gamma_s_scale(uint8_t tick, uint8_t total_ticks)
|
||||
{
|
||||
uint16_t index;
|
||||
|
||||
if(total_ticks == 0U || tick >= total_ticks) return 4096U;
|
||||
index = (uint16_t)(((uint16_t)tick * 100U +
|
||||
(total_ticks / 2U)) / total_ticks);
|
||||
if(index > 100U) index = 100U;
|
||||
return transition_gamma_s_q12[index];
|
||||
}
|
||||
|
||||
static uint16_t transition_gamma_out_scale(uint8_t tick, uint8_t total_ticks)
|
||||
{
|
||||
uint16_t index;
|
||||
|
||||
if(total_ticks == 0U || tick >= total_ticks) return 4096U;
|
||||
index = (uint16_t)(((uint16_t)tick * 100U +
|
||||
(total_ticks / 2U)) / total_ticks);
|
||||
if(index > 100U) index = 100U;
|
||||
return (uint16_t)(4096U - power_fade_gamma_q12[100U - index]);
|
||||
}
|
||||
|
||||
static uint16_t interpolate_mode_output(uint16_t start, uint16_t target,
|
||||
uint8_t tick)
|
||||
{
|
||||
uint32_t delta;
|
||||
uint16_t progress_q12;
|
||||
uint8_t total_ticks = mode_transition_total_ticks;
|
||||
|
||||
if(total_ticks == 0U || tick >= total_ticks) return target;
|
||||
if(mode_transition_gamma_curve == TRANSITION_CURVE_GAMMA_S)
|
||||
progress_q12 = transition_gamma_s_scale(tick, total_ticks);
|
||||
else if(mode_transition_gamma_curve == TRANSITION_CURVE_GAMMA_OUT)
|
||||
progress_q12 = transition_gamma_out_scale(tick, total_ticks);
|
||||
else
|
||||
progress_q12 = (uint16_t)(
|
||||
((uint32_t)tick * 4096U + (total_ticks / 2U)) / total_ticks);
|
||||
|
||||
if(tick >= MODE_TRANSITION_TICKS) return target;
|
||||
if(target >= start)
|
||||
{
|
||||
delta = (uint32_t)(target - start) * tick;
|
||||
delta = (uint32_t)(target - start) * progress_q12;
|
||||
return (uint16_t)(start +
|
||||
((delta + (MODE_TRANSITION_TICKS / 2U)) /
|
||||
MODE_TRANSITION_TICKS));
|
||||
((delta + 2048U) >> 12));
|
||||
}
|
||||
|
||||
delta = (uint32_t)(start - target) * tick;
|
||||
delta = (uint32_t)(start - target) * progress_q12;
|
||||
return (uint16_t)(start -
|
||||
((delta + (MODE_TRANSITION_TICKS / 2U)) /
|
||||
MODE_TRANSITION_TICKS));
|
||||
((delta + 2048U) >> 12));
|
||||
}
|
||||
|
||||
static uint16_t effect_gamma_output(uint16_t level)
|
||||
@@ -265,6 +324,16 @@ void Light_Transition_BeginModeChange(void)
|
||||
mode_transition_start_w = W_PWM_duty;
|
||||
mode_transition_start_c = C_PWM_duty;
|
||||
mode_transition_tick = 0U;
|
||||
mode_transition_total_ticks =
|
||||
(choose_mode_falsg == CUSTOM_TEMPERATURE_MODE)
|
||||
? CCT_RING_TRANSITION_TICKS : MODE_TRANSITION_TICKS;
|
||||
if(Mode == mode0 && choose_mode_falsg <= 2U)
|
||||
mode_transition_gamma_curve = TRANSITION_CURVE_GAMMA_S;
|
||||
else if(Mode == mode0 &&
|
||||
choose_mode_falsg == CUSTOM_TEMPERATURE_MODE)
|
||||
mode_transition_gamma_curve = TRANSITION_CURVE_GAMMA_OUT;
|
||||
else
|
||||
mode_transition_gamma_curve = TRANSITION_CURVE_GAMMA_S;
|
||||
Light_Transition_ModeActive = 1U;
|
||||
}
|
||||
|
||||
@@ -302,6 +371,7 @@ void Light_Transition_Task(void)
|
||||
uint16_t weak_mix;
|
||||
uint16_t required_total;
|
||||
uint16_t floor_w;
|
||||
uint16_t color_progress_q12;
|
||||
uint32_t scaled_w_q12;
|
||||
uint32_t scaled_c_q12;
|
||||
uint8_t power_transitioning;
|
||||
@@ -344,18 +414,28 @@ void Light_Transition_Task(void)
|
||||
/*
|
||||
* Continuous CCT uses one shared brightness envelope. Derive one
|
||||
* side from the other so every visible step is strictly complementary
|
||||
* and W + C remains constant throughout the sweep.
|
||||
* and W + C remains constant throughout the sweep. Map the color
|
||||
* position through the same symmetric Gamma curve used by static
|
||||
* transitions so the ends of each sweep are also eased.
|
||||
*/
|
||||
target_total = (uint16_t)(
|
||||
((uint32_t)LIGHT_OUTPUT_SCALE * brightness_scale + 2048U) >> 12);
|
||||
target_w = (uint16_t)(
|
||||
((uint32_t)target_total * W_PWM + 50U) / 100U);
|
||||
if(target_w > target_total)
|
||||
target_w = target_total;
|
||||
target_c = target_total - target_w;
|
||||
color_progress_q12 =
|
||||
transition_gamma_s_q12[(C_PWM <= 100U) ? C_PWM : 100U];
|
||||
target_c = (uint16_t)(
|
||||
((uint32_t)target_total * color_progress_q12 + 2048U) >> 12);
|
||||
if(target_c > target_total)
|
||||
target_c = target_total;
|
||||
target_w = target_total - target_c;
|
||||
}
|
||||
else if(Mode == mode1)
|
||||
else if(Mode == mode1 ||
|
||||
(Mode == mode3 && choose_mode_falsg == 8U))
|
||||
{
|
||||
/*
|
||||
* Breathing and overlap-gradient amplitudes are perceptual light
|
||||
* transitions, so both use the Gamma table instead of raw linear
|
||||
* channel levels. Jump/flash modes remain outside this branch.
|
||||
*/
|
||||
target_w = (uint16_t)(
|
||||
((uint32_t)effect_gamma_output(W_PWM) *
|
||||
brightness_scale + 2048U) >> 12);
|
||||
@@ -435,9 +515,11 @@ void Light_Transition_Task(void)
|
||||
C_PWM_duty =
|
||||
interpolate_mode_output(mode_transition_start_c, target_c,
|
||||
mode_transition_tick);
|
||||
if(mode_transition_tick >= MODE_TRANSITION_TICKS)
|
||||
if(mode_transition_tick >= mode_transition_total_ticks)
|
||||
{
|
||||
Light_Transition_ModeActive = 0U;
|
||||
}
|
||||
}
|
||||
else if(((Mode == mode2 || Mode == mode3) && powered_on) ||
|
||||
power_transitioning ||
|
||||
transition_sync_pending)
|
||||
|
||||
@@ -1,657 +1,179 @@
|
||||
#include "rf433_decoder.h"
|
||||
#include "rf433_decoder_port.h"
|
||||
|
||||
#define RF433_FIFO_SIZE 256u
|
||||
/*
|
||||
* DWM11 fixed-width 24-bit RF433 decoder.
|
||||
*
|
||||
* The input is sampled every 100 us. A complete pulse pair is evaluated on
|
||||
* each rising edge, exactly like the proven DWM11 implementation.
|
||||
*/
|
||||
#define RF433_SYNC_HIGH_MIN_EXCLUSIVE 1u
|
||||
#define RF433_SYNC_HIGH_MAX_EXCLUSIVE 7u
|
||||
#define RF433_SYNC_LOW_MIN_EXCLUSIVE 115u
|
||||
#define RF433_SYNC_LOW_MAX_EXCLUSIVE 130u
|
||||
|
||||
#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_ZERO_HIGH_MIN 1u
|
||||
#define RF433_ZERO_HIGH_MAX 7u
|
||||
#define RF433_ZERO_LOW_MIN 7u
|
||||
#define RF433_ZERO_LOW_MAX 16u
|
||||
|
||||
#define RF433_ONE_HIGH_MIN 7u
|
||||
#define RF433_ONE_HIGH_MAX 16u
|
||||
#define RF433_ONE_LOW_MIN 2u
|
||||
#define RF433_ONE_LOW_MAX 7u
|
||||
|
||||
#define RF433_BIT_LEN 24u
|
||||
#define RF433_DIRECT_CONFIRM 1u
|
||||
#define RF433_WEAK_CONFIRM 2u
|
||||
|
||||
#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_DIRECT_MIN 50u
|
||||
#define RF433_FRAME_SCORE_WEAK_MIN 35u
|
||||
#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_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;
|
||||
volatile uint16_t high_ticks;
|
||||
volatile uint16_t low_ticks;
|
||||
volatile uint8_t current_level;
|
||||
volatile uint8_t sync_found;
|
||||
volatile uint8_t bit_count;
|
||||
volatile uint32_t data;
|
||||
volatile uint8_t frame_ready;
|
||||
Rf433DecoderFrame_t frame;
|
||||
bool frame_ready;
|
||||
} Rf433Dwm11Decoder_t;
|
||||
|
||||
static Rf433Dwm11Decoder_t s_dec;
|
||||
|
||||
} Rf433Decode_t;
|
||||
|
||||
static Rf433Fifo_t s_fifo;
|
||||
static Rf433Decode_t s_dec;
|
||||
|
||||
static uint16_t rf433_limit_t(uint16_t t)
|
||||
static void rf433_increment_saturated(volatile uint16_t *value)
|
||||
{
|
||||
if (t < 2u)
|
||||
if (*value < 0xffffu)
|
||||
{
|
||||
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);
|
||||
(*value)++;
|
||||
}
|
||||
}
|
||||
|
||||
static void rf433_decode_reset(void)
|
||||
static uint8_t rf433_in_range(uint16_t value, uint16_t min, uint16_t max)
|
||||
{
|
||||
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);
|
||||
return (value >= min && value <= max) ? 1u : 0u;
|
||||
}
|
||||
|
||||
static void rf433_debug_reset(const char *reason, uint16_t high, uint16_t low)
|
||||
static uint8_t rf433_is_sync(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);
|
||||
return (high > RF433_SYNC_HIGH_MIN_EXCLUSIVE &&
|
||||
high < RF433_SYNC_HIGH_MAX_EXCLUSIVE &&
|
||||
low > RF433_SYNC_LOW_MIN_EXCLUSIVE &&
|
||||
low < RF433_SYNC_LOW_MAX_EXCLUSIVE) ? 1u : 0u;
|
||||
}
|
||||
|
||||
static void rf433_publish_frame(uint32_t code)
|
||||
{
|
||||
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 = 100u;
|
||||
s_dec.frame_ready = 1u;
|
||||
|
||||
RF433_DECODER_LOG("[RF433 DWM11 OK] code=0x%06X key=0x%02X\r\n",
|
||||
(unsigned int)code,
|
||||
s_dec.frame.key);
|
||||
}
|
||||
|
||||
static void rf433_decode_bit(uint8_t bit)
|
||||
{
|
||||
s_dec.data <<= 1;
|
||||
if (bit != 0u)
|
||||
{
|
||||
s_dec.data |= 1u;
|
||||
}
|
||||
|
||||
s_dec.bit_count++;
|
||||
if (s_dec.bit_count >= RF433_BIT_LEN)
|
||||
{
|
||||
rf433_publish_frame(s_dec.data);
|
||||
s_dec.sync_found = 0u;
|
||||
s_dec.bit_count = 0u;
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
|
||||
rf433_decode_reset();
|
||||
s_dec.high_ticks = 0u;
|
||||
s_dec.low_ticks = 0u;
|
||||
s_dec.current_level = 0u;
|
||||
s_dec.sync_found = 0u;
|
||||
s_dec.bit_count = 0u;
|
||||
s_dec.data = 0u;
|
||||
s_dec.frame_ready = 0u;
|
||||
}
|
||||
|
||||
void rf433_decoder_sample(uint8_t level)
|
||||
{
|
||||
uint16_t next;
|
||||
Rf433Pulse_t pulse;
|
||||
uint16_t high;
|
||||
uint16_t low;
|
||||
|
||||
level = level ? 1u : 0u;
|
||||
|
||||
if (!s_fifo.inited)
|
||||
if (level == 0u)
|
||||
{
|
||||
s_fifo.last_level = level;
|
||||
s_fifo.width = 1;
|
||||
s_fifo.inited = 1;
|
||||
rf433_increment_saturated(&s_dec.low_ticks);
|
||||
s_dec.current_level = 0u;
|
||||
return;
|
||||
}
|
||||
|
||||
if (level == s_fifo.last_level)
|
||||
rf433_increment_saturated(&s_dec.high_ticks);
|
||||
|
||||
if (s_dec.current_level == 0u)
|
||||
{
|
||||
if (s_fifo.width < 0xFFFFu)
|
||||
high = s_dec.high_ticks;
|
||||
low = s_dec.low_ticks;
|
||||
|
||||
if (rf433_is_sync(high, low))
|
||||
{
|
||||
s_fifo.width++;
|
||||
s_dec.sync_found = 1u;
|
||||
s_dec.bit_count = 0u;
|
||||
s_dec.data = 0u;
|
||||
}
|
||||
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)
|
||||
else if (s_dec.sync_found != 0u)
|
||||
{
|
||||
s_fifo.fifo[s_fifo.w] = pulse;
|
||||
s_fifo.w = next;
|
||||
}
|
||||
else if (s_fifo.lost < 0xFFFFu)
|
||||
if (rf433_in_range(high, RF433_ZERO_HIGH_MIN, RF433_ZERO_HIGH_MAX) &&
|
||||
rf433_in_range(low, RF433_ZERO_LOW_MIN, RF433_ZERO_LOW_MAX))
|
||||
{
|
||||
s_fifo.lost++;
|
||||
rf433_decode_bit(0u);
|
||||
}
|
||||
}
|
||||
|
||||
static bool rf433_fifo_pop(Rf433Pulse_t *pulse)
|
||||
{
|
||||
if (pulse == 0 || s_fifo.r == s_fifo.w)
|
||||
else if (rf433_in_range(high, RF433_ONE_HIGH_MIN, RF433_ONE_HIGH_MAX) &&
|
||||
rf433_in_range(low, RF433_ONE_LOW_MIN, RF433_ONE_LOW_MAX))
|
||||
{
|
||||
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);
|
||||
rf433_decode_bit(1u);
|
||||
}
|
||||
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 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, uint8_t required_count)
|
||||
{
|
||||
if (code == s_dec.last_code)
|
||||
{
|
||||
if (s_dec.same_cnt < 255u)
|
||||
{
|
||||
s_dec.same_cnt++;
|
||||
s_dec.sync_found = 0u;
|
||||
s_dec.bit_count = 0u;
|
||||
s_dec.data = 0u;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
s_dec.last_code = code;
|
||||
s_dec.same_cnt = 1;
|
||||
|
||||
|
||||
s_dec.low_ticks = 0u;
|
||||
s_dec.high_ticks = 1u;
|
||||
}
|
||||
|
||||
RF433_DETAIL_LOG("[RF433 REPEAT] code=0x%06X same=%d/%d\r\n",
|
||||
(unsigned int)code,
|
||||
s_dec.same_cnt,
|
||||
required_count);
|
||||
|
||||
if (s_dec.same_cnt >= required_count)
|
||||
{
|
||||
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.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();
|
||||
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_DIRECT_MIN)
|
||||
{
|
||||
rf433_output_code(s_dec.data, RF433_DIRECT_CONFIRM);
|
||||
}
|
||||
else if (s_dec.frame_score >= RF433_FRAME_SCORE_WEAK_MIN)
|
||||
{
|
||||
rf433_output_code(s_dec.data, RF433_WEAK_CONFIRM);
|
||||
}
|
||||
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();
|
||||
}
|
||||
}
|
||||
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();
|
||||
}
|
||||
s_dec.current_level = 1u;
|
||||
}
|
||||
|
||||
void rf433_decoder_process(void)
|
||||
{
|
||||
Rf433Pulse_t pulse;
|
||||
uint8_t cnt = 0;
|
||||
|
||||
|
||||
|
||||
|
||||
while ((cnt < RF433_PROCESS_MAX_ONCE) && rf433_fifo_pop(&pulse))
|
||||
{
|
||||
rf433_process_clean_pulse(pulse);
|
||||
cnt++;
|
||||
}
|
||||
/* DWM11 decodes directly in the 100 us sampling callback. */
|
||||
}
|
||||
|
||||
bool rf433_decoder_get_frame(Rf433DecoderFrame_t *frame)
|
||||
{
|
||||
if (frame == 0 || !s_dec.frame_ready)
|
||||
if (frame == 0 || s_dec.frame_ready == 0u)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
*frame = s_dec.frame;
|
||||
s_dec.frame_ready = false;
|
||||
s_dec.frame_ready = 0u;
|
||||
return true;
|
||||
}
|
||||
|
||||
uint16_t rf433_decoder_get_lost_count(void)
|
||||
{
|
||||
return s_fifo.lost;
|
||||
return 0u;
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#include "pwm.h"
|
||||
#include "light_transition.h"
|
||||
#include "usr_server.h"
|
||||
#include "external_key.h"
|
||||
/*********************************************************************************************************************/
|
||||
|
||||
void rwip_schedule(void);
|
||||
|
||||
@@ -174,6 +174,17 @@ void scan_uart(uint8_t *arr)
|
||||
case 12:
|
||||
power_restore_policy_set(user_rx_buf[1]);
|
||||
break;
|
||||
case 13:
|
||||
if(user_rx_buf[1] == 0x01U)
|
||||
rf433_start_pairing();
|
||||
else
|
||||
rf433_cancel_pairing();
|
||||
break;
|
||||
case 14:
|
||||
/* A5 guard prevents accidental clear. */
|
||||
if(user_rx_buf[1] == 0xA5U)
|
||||
rf433_clear_code();
|
||||
break;
|
||||
case 9:
|
||||
|
||||
break;
|
||||
|
||||
@@ -102,6 +102,10 @@ static uint8_t ble_last_brightness;
|
||||
static uint8_t ble_last_speed;
|
||||
static uint8_t ble_last_temperature;
|
||||
static uint8_t ble_last_power_mode;
|
||||
static volatile uint8_t ble_remote_event_pending;
|
||||
static volatile uint8_t ble_remote_event_command;
|
||||
static volatile uint8_t ble_remote_event_status;
|
||||
static volatile uint8_t ble_remote_event_paired_count;
|
||||
|
||||
static uint8_t ble_temperature_value(void)
|
||||
{
|
||||
@@ -112,10 +116,22 @@ static uint8_t ble_temperature_value(void)
|
||||
void ble_state_disconnect(void)
|
||||
{
|
||||
custom_svc_tx_char_notify = DISABLE;
|
||||
ble_remote_event_pending = 0U;
|
||||
send_flag = 1U;
|
||||
ble_state_dirty = BLE_STATE_DIRTY_ALL;
|
||||
}
|
||||
|
||||
void ble_remote_event_notify(uint8_t command, uint8_t status,
|
||||
uint8_t paired_count)
|
||||
{
|
||||
if(!custom_svc_tx_char_notify) return;
|
||||
|
||||
ble_remote_event_command = command;
|
||||
ble_remote_event_status = status;
|
||||
ble_remote_event_paired_count = paired_count;
|
||||
ble_remote_event_pending = 1U;
|
||||
}
|
||||
|
||||
void ble_state_sync_poll(void)
|
||||
{
|
||||
uint8_t data[4] = {0U, 0U, 0U, 0U};
|
||||
@@ -138,7 +154,24 @@ void ble_state_sync_poll(void)
|
||||
if(power_restore_policy != ble_last_power_mode)
|
||||
ble_state_dirty |= BLE_STATE_DIRTY_POWER_MODE;
|
||||
|
||||
if(!send_flag || !ble_state_dirty) return;
|
||||
if(!send_flag) return;
|
||||
|
||||
/*
|
||||
* Remote pairing/clear acknowledgements have priority over periodic
|
||||
* state synchronization so the APP receives operation results promptly.
|
||||
*/
|
||||
if(ble_remote_event_pending)
|
||||
{
|
||||
data[0] = ble_remote_event_status;
|
||||
data[1] = ble_remote_event_paired_count;
|
||||
data[3] = ble_remote_event_command;
|
||||
if(slave_send_data(data, sizeof(data),
|
||||
CUSTOM_SVC_TX_CHAR_VAL) == GATT_NO_ERROR)
|
||||
ble_remote_event_pending = 0U;
|
||||
return;
|
||||
}
|
||||
|
||||
if(!ble_state_dirty) return;
|
||||
|
||||
if(ble_state_dirty & BLE_STATE_DIRTY_POWER)
|
||||
{
|
||||
|
||||
@@ -49,4 +49,6 @@ uint8_t custom_svc_add(void);
|
||||
uint8_t slave_send_data(uint8_t *data, uint8_t len, uint8_t att_idx);
|
||||
void ble_state_sync_poll(void);
|
||||
void ble_state_disconnect(void);
|
||||
void ble_remote_event_notify(uint8_t command, uint8_t status,
|
||||
uint8_t paired_count);
|
||||
#endif // _USR_SERVER_H_
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -22,44 +22,249 @@ Dialog DLL: TARMCM1.DLL V1.14.6.0
|
||||
|
||||
<h2>Project:</h2>
|
||||
D:\workplace\工作文件\程序\新向远XC6517蓝牙芯片\PWM32EPRO\project\example\ble\ble_peripheral\mdk\ble_peripheral.uvprojx
|
||||
Project File Date: 07/26/2026
|
||||
Project File Date: 07/29/2026
|
||||
|
||||
<h2>Output:</h2>
|
||||
*** Using Compiler 'V5.06 update 6 (build 750)', folder: 'D:\Program Files\Keil_v5\ARM\ARMCC\Bin'
|
||||
Build target 'ble-sdk-xip_scan'
|
||||
Note: source file '..\app\src\uart.c' - object file renamed from '.\Objects\uart.o' to '.\Objects\uart_1.o'.
|
||||
compiling light_transition.c...
|
||||
..\app\src\pwm.h(134): warning: #1295-D: Deprecated declaration _PWM_INIT - give arg types
|
||||
void _PWM_INIT();
|
||||
..\app\src\pwm.h(140): warning: #1295-D: Deprecated declaration adc_Init - give arg types
|
||||
void adc_Init();
|
||||
..\app\src\pwm.h(141): warning: #1295-D: Deprecated declaration My_ADC_Get_Value - give arg types
|
||||
void My_ADC_Get_Value();
|
||||
..\app\src\pwm.h(142): warning: #1295-D: Deprecated declaration gpio_pullup_input_inter_test - give arg types
|
||||
void gpio_pullup_input_inter_test();
|
||||
..\app\src\mode.h(39): warning: #1295-D: Deprecated declaration choice_mode - give arg types
|
||||
compiling Rf433.c...
|
||||
..\app\src\RF433.h(185): warning: #1295-D: Deprecated declaration rf433_receive - give arg types
|
||||
void rf433_receive();
|
||||
..\app\src\RF433.h(186): warning: #1295-D: Deprecated declaration rf433_gpio_init - give arg types
|
||||
void rf433_gpio_init();
|
||||
..\app\src\RF433.h(187): warning: #1295-D: Deprecated declaration scan_433 - give arg types
|
||||
void scan_433();
|
||||
..\app\src\RF433.h(188): warning: #1295-D: Deprecated declaration Lock_Pwm7xd - give arg types
|
||||
void Lock_Pwm7xd();
|
||||
..\app\src\RF433.h(189): warning: #1295-D: Deprecated declaration Delay_50us - give arg types
|
||||
void Delay_50us();
|
||||
..\app\src\RF433.h(190): warning: #1295-D: Deprecated declaration Encoder_key - give arg types
|
||||
void Encoder_key();
|
||||
..\app\src\mode.h(43): warning: #1295-D: Deprecated declaration choice_mode - give arg types
|
||||
void choice_mode();
|
||||
..\app\src\mode.h(40): warning: #1295-D: Deprecated declaration set_mode - give arg types
|
||||
..\app\src\mode.h(44): warning: #1295-D: Deprecated declaration set_mode - give arg types
|
||||
void set_mode();
|
||||
..\app\src\mode.h(41): warning: #1295-D: Deprecated declaration Start_PWM - give arg types
|
||||
..\app\src\mode.h(45): warning: #1295-D: Deprecated declaration Start_PWM - give arg types
|
||||
void Start_PWM();
|
||||
..\app\src\mode.h(42): warning: #1295-D: Deprecated declaration Stop_PWM - give arg types
|
||||
..\app\src\mode.h(46): warning: #1295-D: Deprecated declaration Stop_PWM - give arg types
|
||||
void Stop_PWM();
|
||||
..\app\src\mode.h(43): warning: #1295-D: Deprecated declaration Set_timing - give arg types
|
||||
..\app\src\mode.h(47): warning: #1295-D: Deprecated declaration Set_timing - give arg types
|
||||
void Set_timing();
|
||||
..\app\src\light_transition.c: 9 warnings, 0 errors
|
||||
..\app\src\pwm.h(137): warning: #1295-D: Deprecated declaration _PWM_INIT - give arg types
|
||||
void _PWM_INIT();
|
||||
..\app\src\pwm.h(143): warning: #1295-D: Deprecated declaration adc_Init - give arg types
|
||||
void adc_Init();
|
||||
..\app\src\pwm.h(144): warning: #1295-D: Deprecated declaration My_ADC_Get_Value - give arg types
|
||||
void My_ADC_Get_Value();
|
||||
..\app\src\pwm.h(145): warning: #1295-D: Deprecated declaration gpio_pullup_input_inter_test - give arg types
|
||||
void gpio_pullup_input_inter_test();
|
||||
..\app\src\Rf433.c(659): warning: #223-D: function "temperature" declared implicitly
|
||||
temperature((uint8_t)(((uint16_t)(255U - res_data) * 255U + 119U) / 239U));
|
||||
..\app\src\Rf433.c(24): warning: #177-D: variable "POWER_flag" was declared but never referenced
|
||||
static uint8_t POWER_flag;
|
||||
..\app\src\Rf433.c: 17 warnings, 0 errors
|
||||
compiling app_sec.c...
|
||||
..\app\src\app_sec.c(414): warning: #177-D: variable "param" was declared but never referenced
|
||||
struct gapc_encrypt_req_ind const *param = (struct gapc_encrypt_req_ind const *)p_param;
|
||||
..\app\src\app_sec.c: 1 warning, 0 errors
|
||||
compiling app_task.c...
|
||||
..\app\src\app_task.c(450): warning: #223-D: function "ke_timer_set" declared implicitly
|
||||
ke_timer_set(APP_SECOND_ADV_START, TASK_APP, 400); // start open noconnect adv
|
||||
..\app\src\app_task.c(463): warning: #61-D: integer operation result is out of range
|
||||
value &= ~(0xff << 24);
|
||||
..\app\src\app_task.c(473): warning: #223-D: function "custom_svc_add" declared implicitly
|
||||
if (!custom_svc_add()) {
|
||||
..\app\src\app_task.c(496): warning: #223-D: function "ke_timer_set" declared implicitly
|
||||
ke_timer_set(APP_SCAN_START, TASK_APP, 10);
|
||||
..\app\src\app_task.c(640): warning: #177-D: variable "p_param" was declared but never referenced
|
||||
struct gapm_ext_adv_report_ind *p_param = (struct gapm_ext_adv_report_ind *)param;
|
||||
..\app\src\app_task.c(688): warning: #223-D: function "xc_ble_gatt_cli_mtu_exch" declared implicitly
|
||||
xc_ble_gatt_cli_mtu_exch(conidx, app_env.user_lid);
|
||||
..\app\src\app_task.c(804): warning: #223-D: function "ke_timer_set" declared implicitly
|
||||
ke_timer_set(APP_SCAN_STOP, TASK_APP, 200); // start open noconnect adv
|
||||
..\app\src\app_task.c(818): warning: #223-D: function "ke_timer_set" declared implicitly
|
||||
ke_timer_set(APP_SCAN_START, TASK_APP, 900); // start open noconnect adv
|
||||
..\app\src\app_task.c(835): warning: #223-D: function "app_switch_mode" declared implicitly
|
||||
app_switch_mode(app_mode);
|
||||
..\app\src\app_task.c(836): warning: #940-D: missing return statement at end of non-void function "app_mode_switch_handler"
|
||||
}
|
||||
..\app\src\app_task.c(837): warning: #159-D: declaration is incompatible with previous "app_switch_mode" (declared at line 835)
|
||||
void app_switch_mode(uint8_t mode)
|
||||
..\app\src\app_task.c(845): warning: #223-D: function "ke_timer_set" declared implicitly
|
||||
ke_timer_set(APP_SECOND_ADV_START, TASK_APP, 400); // start open noconnect adv
|
||||
..\app\src\app_task.c(306): warning: #177-D: function "app_get_handler" was declared but never referenced
|
||||
static uint8_t app_get_handler(const struct app_subtask_handlers *handler_list_desc, ke_msg_id_t msgid, void *p_param,
|
||||
..\app\src\app_task.c: 13 warnings, 0 errors
|
||||
compiling ota_protocol.c...
|
||||
..\app\src\ota_protocol.c(35): warning: #120-D: return value type does not match the function type
|
||||
return &fota_env;
|
||||
..\app\src\ota_protocol.c(149): warning: #550-D: variable "sw_ver" was set but never used
|
||||
uint16_t sw_ver;
|
||||
..\app\src\ota_protocol.c(150): warning: #550-D: variable "rom_ver" was set but never used
|
||||
uint16_t rom_ver;
|
||||
..\app\src\ota_protocol.c(292): warning: #177-D: label "defult" was declared but never referenced
|
||||
defult:
|
||||
..\app\src\ota_protocol.c(320): warning: #223-D: function "ble_flash_later_page_erase" declared implicitly
|
||||
ble_flash_later_page_erase(OTA_PARAM_ADDR);
|
||||
..\app\src\ota_protocol.c: 5 warnings, 0 errors
|
||||
compiling rgblight.c...
|
||||
compiling ota_server.c...
|
||||
compiling app_batt.c...
|
||||
compiling arch_main.c...
|
||||
..\app\src\pwm.h(137): warning: #1295-D: Deprecated declaration _PWM_INIT - give arg types
|
||||
void _PWM_INIT();
|
||||
..\app\src\pwm.h(143): warning: #1295-D: Deprecated declaration adc_Init - give arg types
|
||||
void adc_Init();
|
||||
..\app\src\pwm.h(144): warning: #1295-D: Deprecated declaration My_ADC_Get_Value - give arg types
|
||||
void My_ADC_Get_Value();
|
||||
..\app\src\pwm.h(145): warning: #1295-D: Deprecated declaration gpio_pullup_input_inter_test - give arg types
|
||||
void gpio_pullup_input_inter_test();
|
||||
..\app\src\mode.h(43): warning: #1295-D: Deprecated declaration choice_mode - give arg types
|
||||
void choice_mode();
|
||||
..\app\src\mode.h(44): warning: #1295-D: Deprecated declaration set_mode - give arg types
|
||||
void set_mode();
|
||||
..\app\src\mode.h(45): warning: #1295-D: Deprecated declaration Start_PWM - give arg types
|
||||
void Start_PWM();
|
||||
..\app\src\mode.h(46): warning: #1295-D: Deprecated declaration Stop_PWM - give arg types
|
||||
void Stop_PWM();
|
||||
..\app\src\mode.h(47): warning: #1295-D: Deprecated declaration Set_timing - give arg types
|
||||
void Set_timing();
|
||||
..\app\src\RF433.h(185): warning: #1295-D: Deprecated declaration rf433_receive - give arg types
|
||||
void rf433_receive();
|
||||
..\app\src\RF433.h(186): warning: #1295-D: Deprecated declaration rf433_gpio_init - give arg types
|
||||
void rf433_gpio_init();
|
||||
..\app\src\RF433.h(187): warning: #1295-D: Deprecated declaration scan_433 - give arg types
|
||||
void scan_433();
|
||||
..\app\src\RF433.h(188): warning: #1295-D: Deprecated declaration Lock_Pwm7xd - give arg types
|
||||
void Lock_Pwm7xd();
|
||||
..\app\src\RF433.h(189): warning: #1295-D: Deprecated declaration Delay_50us - give arg types
|
||||
void Delay_50us();
|
||||
..\app\src\RF433.h(190): warning: #1295-D: Deprecated declaration Encoder_key - give arg types
|
||||
void Encoder_key();
|
||||
..\app\src\arch_main.c(163): warning: #223-D: function "xc_fmc_spi_init_oprt" declared implicitly
|
||||
xc_fmc_spi_init_oprt();
|
||||
..\app\src\arch_main.c(164): warning: #223-D: function "xc_fmc_spi_flash_wake_up" declared implicitly
|
||||
xc_fmc_spi_flash_wake_up();
|
||||
..\app\src\arch_main.c(166): warning: #223-D: function "xc_fmc_spi_flash_rdid" declared implicitly
|
||||
xc_fmc_spi_flash_rdid((uint8_t *)&mid);
|
||||
..\app\src\arch_main.c(171): warning: #223-D: function "xc_fmc_spi_flash_ruid" declared implicitly
|
||||
xc_fmc_spi_flash_ruid(ruid);
|
||||
..\app\src\arch_main.c(188): warning: #223-D: function "xc_unique_identification_read" declared implicitly
|
||||
if (false == xc_unique_identification_read(co_default_bdaddr.addr)) {
|
||||
..\app\src\arch_main.c(161): warning: #177-D: variable "flash_size" was declared but never referenced
|
||||
uint32_t flash_size;
|
||||
..\app\src\arch_main.c(162): warning: #177-D: variable "flash_type" was declared but never referenced
|
||||
uint16_t flash_type;
|
||||
..\app\src\arch_main.c(215): warning: #144-D: a value of type "uint32_t *" cannot be used to initialize an entity of type "uint8_t *"
|
||||
uint8_t *ptr = (uint32_t *)(0x10000800);
|
||||
..\app\src\arch_main.c(375): warning: #188-D: enumerated type mixed with another type
|
||||
wdt_cfg.ReloadValue = WDT_CLK_32K_RESET_MODE0_8192MS;
|
||||
..\app\src\arch_main.c(395): warning: #223-D: function "xc_fmc_spi_init_oprt" declared implicitly
|
||||
xc_fmc_spi_init_oprt( );
|
||||
..\app\src\arch_main.c(396): warning: #223-D: function "xc_fmc_spi_flash_wake_up" declared implicitly
|
||||
xc_fmc_spi_flash_wake_up();
|
||||
..\app\src\arch_main.c(462): warning: #223-D: function "TaskProcess" declared implicitly
|
||||
TaskProcess();
|
||||
..\app\src\arch_main.c: 27 warnings, 0 errors
|
||||
compiling Mode.c...
|
||||
..\app\src\pwm.h(137): warning: #1295-D: Deprecated declaration _PWM_INIT - give arg types
|
||||
void _PWM_INIT();
|
||||
..\app\src\pwm.h(143): warning: #1295-D: Deprecated declaration adc_Init - give arg types
|
||||
void adc_Init();
|
||||
..\app\src\pwm.h(144): warning: #1295-D: Deprecated declaration My_ADC_Get_Value - give arg types
|
||||
void My_ADC_Get_Value();
|
||||
..\app\src\pwm.h(145): warning: #1295-D: Deprecated declaration gpio_pullup_input_inter_test - give arg types
|
||||
void gpio_pullup_input_inter_test();
|
||||
..\app\src\mode.h(43): warning: #1295-D: Deprecated declaration choice_mode - give arg types
|
||||
void choice_mode();
|
||||
..\app\src\mode.h(44): warning: #1295-D: Deprecated declaration set_mode - give arg types
|
||||
void set_mode();
|
||||
..\app\src\mode.h(45): warning: #1295-D: Deprecated declaration Start_PWM - give arg types
|
||||
void Start_PWM();
|
||||
..\app\src\mode.h(46): warning: #1295-D: Deprecated declaration Stop_PWM - give arg types
|
||||
void Stop_PWM();
|
||||
..\app\src\mode.h(47): warning: #1295-D: Deprecated declaration Set_timing - give arg types
|
||||
void Set_timing();
|
||||
..\app\src\RF433.h(185): warning: #1295-D: Deprecated declaration rf433_receive - give arg types
|
||||
void rf433_receive();
|
||||
..\app\src\RF433.h(186): warning: #1295-D: Deprecated declaration rf433_gpio_init - give arg types
|
||||
void rf433_gpio_init();
|
||||
..\app\src\RF433.h(187): warning: #1295-D: Deprecated declaration scan_433 - give arg types
|
||||
void scan_433();
|
||||
..\app\src\RF433.h(188): warning: #1295-D: Deprecated declaration Lock_Pwm7xd - give arg types
|
||||
void Lock_Pwm7xd();
|
||||
..\app\src\RF433.h(189): warning: #1295-D: Deprecated declaration Delay_50us - give arg types
|
||||
void Delay_50us();
|
||||
..\app\src\RF433.h(190): warning: #1295-D: Deprecated declaration Encoder_key - give arg types
|
||||
void Encoder_key();
|
||||
..\app\src\Mode.c: 15 warnings, 0 errors
|
||||
compiling timeslice.c...
|
||||
..\app\src\mode.h(43): warning: #1295-D: Deprecated declaration choice_mode - give arg types
|
||||
void choice_mode();
|
||||
..\app\src\mode.h(44): warning: #1295-D: Deprecated declaration set_mode - give arg types
|
||||
void set_mode();
|
||||
..\app\src\mode.h(45): warning: #1295-D: Deprecated declaration Start_PWM - give arg types
|
||||
void Start_PWM();
|
||||
..\app\src\mode.h(46): warning: #1295-D: Deprecated declaration Stop_PWM - give arg types
|
||||
void Stop_PWM();
|
||||
..\app\src\mode.h(47): warning: #1295-D: Deprecated declaration Set_timing - give arg types
|
||||
void Set_timing();
|
||||
..\app\src\RF433.h(185): warning: #1295-D: Deprecated declaration rf433_receive - give arg types
|
||||
void rf433_receive();
|
||||
..\app\src\RF433.h(186): warning: #1295-D: Deprecated declaration rf433_gpio_init - give arg types
|
||||
void rf433_gpio_init();
|
||||
..\app\src\RF433.h(187): warning: #1295-D: Deprecated declaration scan_433 - give arg types
|
||||
void scan_433();
|
||||
..\app\src\RF433.h(188): warning: #1295-D: Deprecated declaration Lock_Pwm7xd - give arg types
|
||||
void Lock_Pwm7xd();
|
||||
..\app\src\RF433.h(189): warning: #1295-D: Deprecated declaration Delay_50us - give arg types
|
||||
void Delay_50us();
|
||||
..\app\src\RF433.h(190): warning: #1295-D: Deprecated declaration Encoder_key - give arg types
|
||||
void Encoder_key();
|
||||
..\app\src\pwm.h(137): warning: #1295-D: Deprecated declaration _PWM_INIT - give arg types
|
||||
void _PWM_INIT();
|
||||
..\app\src\pwm.h(143): warning: #1295-D: Deprecated declaration adc_Init - give arg types
|
||||
void adc_Init();
|
||||
..\app\src\pwm.h(144): warning: #1295-D: Deprecated declaration My_ADC_Get_Value - give arg types
|
||||
void My_ADC_Get_Value();
|
||||
..\app\src\pwm.h(145): warning: #1295-D: Deprecated declaration gpio_pullup_input_inter_test - give arg types
|
||||
void gpio_pullup_input_inter_test();
|
||||
..\app\src\timeslice.c: 15 warnings, 0 errors
|
||||
compiling usr_server.c...
|
||||
..\app\src\Mode.h(43): warning: #1295-D: Deprecated declaration choice_mode - give arg types
|
||||
void choice_mode();
|
||||
..\app\src\Mode.h(44): warning: #1295-D: Deprecated declaration set_mode - give arg types
|
||||
void set_mode();
|
||||
..\app\src\Mode.h(45): warning: #1295-D: Deprecated declaration Start_PWM - give arg types
|
||||
void Start_PWM();
|
||||
..\app\src\Mode.h(46): warning: #1295-D: Deprecated declaration Stop_PWM - give arg types
|
||||
void Stop_PWM();
|
||||
..\app\src\Mode.h(47): warning: #1295-D: Deprecated declaration Set_timing - give arg types
|
||||
void Set_timing();
|
||||
..\app\src\PWM.h(137): warning: #1295-D: Deprecated declaration _PWM_INIT - give arg types
|
||||
void _PWM_INIT();
|
||||
..\app\src\PWM.h(143): warning: #1295-D: Deprecated declaration adc_Init - give arg types
|
||||
void adc_Init();
|
||||
..\app\src\PWM.h(144): warning: #1295-D: Deprecated declaration My_ADC_Get_Value - give arg types
|
||||
void My_ADC_Get_Value();
|
||||
..\app\src\PWM.h(145): warning: #1295-D: Deprecated declaration gpio_pullup_input_inter_test - give arg types
|
||||
void gpio_pullup_input_inter_test();
|
||||
..\app\src\usr_server.c(275): warning: #223-D: function "ble_callback" declared implicitly
|
||||
ble_callback(co_buf_data(p_data)[0],co_buf_data(p_data)[1],co_buf_data(p_data)[2],co_buf_data(p_data)[3]);
|
||||
..\app\src\usr_server.c: 10 warnings, 0 errors
|
||||
linking...
|
||||
Program Size: Code=27716 RO-data=1380 RW-data=2740 ZI-data=3700
|
||||
Program Size: Code=32064 RO-data=2208 RW-data=2804 ZI-data=3856
|
||||
FromELF: creating hex file...
|
||||
After Build - User command #1: fromelf --bin --output=app.bin .\Objects\Xinc_ble_sdk.axf
|
||||
After Build - User command #2: .\output_tool\ge_ota_scan.bat
|
||||
Size of file: 29380 bytes.
|
||||
all_size=29380
|
||||
Size of file: 34532 bytes.
|
||||
all_size=34532
|
||||
dual_xip
|
||||
Addr:13000
|
||||
Size:0x72c4
|
||||
Size:0x86e4
|
||||
BAddr:0x40000
|
||||
Acheck:0x42b99760
|
||||
Acheck:0x36596580
|
||||
SoftVer:0x10
|
||||
RomVer:0x20
|
||||
LoadAddr:0x11013000
|
||||
@@ -87,7 +292,7 @@ status2=1
|
||||
updata file success !
|
||||
已复制 1 个文件。
|
||||
已复制 1 个文件。
|
||||
".\Objects\Xinc_ble_sdk.axf" - 0 Error(s), 9 Warning(s).
|
||||
".\Objects\Xinc_ble_sdk.axf" - 0 Error(s), 103 Warning(s).
|
||||
|
||||
<h2>Software Packages used:</h2>
|
||||
|
||||
@@ -100,7 +305,7 @@ Package Vendor: ARM
|
||||
D:/Program Files/Keil_v5/ARM/Packs/ARM/CMSIS/5.9.0/Device/ARM/ARMCM0/Include
|
||||
|
||||
<h2>Collection of Component Files used:</h2>
|
||||
Build Time Elapsed: 00:00:07
|
||||
Build Time Elapsed: 00:00:09
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -42,9 +42,11 @@
|
||||
".\objects\rgblight.o"
|
||||
".\objects\mode.o"
|
||||
".\objects\rf433.o"
|
||||
".\objects\rf433_decoder.o"
|
||||
".\objects\pwm.o"
|
||||
".\objects\bridge_pwm.o"
|
||||
".\objects\light_transition.o"
|
||||
".\objects\external_key.o"
|
||||
".\objects\fmc_spi.o"
|
||||
--strict --scatter ".\Linker\cpu_xip_scan.scat"
|
||||
--feedback fb.txt --summary_stderr --info summarysizes --map --load_addr_map_info --xref --callgraph --symbols
|
||||
|
||||
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.
@@ -132,6 +132,8 @@
|
||||
.\objects\arch_main.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\math.h
|
||||
.\objects\arch_main.o: ..\app\src\mode.h
|
||||
.\objects\arch_main.o: ..\app\src\RF433.h
|
||||
.\objects\arch_main.o: ..\app\src\rf433_decoder.h
|
||||
.\objects\arch_main.o: ..\app\src\external_key.h
|
||||
.\objects\arch_main.o: ..\app\src\rgblight.h
|
||||
.\objects\arch_main.o: ..\app\src\timer.h
|
||||
.\objects\arch_main.o: ..\app\src\fmc_spi.h
|
||||
|
||||
Binary file not shown.
+207
-72
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,63 @@
|
||||
.\objects\external_key.o: ..\app\src\external_key.c
|
||||
.\objects\external_key.o: ..\app\src\external_key.h
|
||||
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_gpio.h
|
||||
.\objects\external_key.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stdbool.h
|
||||
.\objects\external_key.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stdio.h
|
||||
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc6xxx.h
|
||||
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc60xx.h
|
||||
.\objects\external_key.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stdint.h
|
||||
.\objects\external_key.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\string.h
|
||||
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\core_cm0.h
|
||||
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\core_cmInstr.h
|
||||
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\core_cmFunc.h
|
||||
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_conf.h
|
||||
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc_m0_register\xc_reg_cpr.h
|
||||
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc_m0_register\xc_reg_offset.h
|
||||
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc_m0_register\xc_reg_cprao.h
|
||||
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc_m0_register\xc_reg_rf.h
|
||||
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc_m0_register\xc_reg_adc.h
|
||||
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc_m0_register\xc_reg_aotimer.h
|
||||
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc6xxx.h
|
||||
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc_m0_register\xc_reg_dma.h
|
||||
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc_m0_register\xc_reg_fmc.h
|
||||
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc_m0_register\xc_reg_fmc_cache.h
|
||||
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc_m0_register\xc_reg_gpio.h
|
||||
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc_m0_register\xc_reg_i2c.h
|
||||
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc_m0_register\xc_reg_qdec.h
|
||||
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc_m0_register\xc_reg_pwm.h
|
||||
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc_m0_register\xc_reg_pwm_comn.h
|
||||
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc_m0_register\xc_reg_rtc.h
|
||||
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\core_cm0.h
|
||||
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc_m0_register\xc_reg_spi.h
|
||||
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc_m0_register\xc_reg_timer.h
|
||||
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc_m0_register\xc_reg_uart.h
|
||||
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc_m0_register\xc_reg_wdt.h
|
||||
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc_m0_register\xc_reg_pwm_timer.h
|
||||
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_calib.h
|
||||
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_clock.h
|
||||
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_systick.h
|
||||
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_pwr.h
|
||||
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_gpio.h
|
||||
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_aotimer.h
|
||||
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_timer.h
|
||||
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_rtc.h
|
||||
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_uart.h
|
||||
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\ringbuffer.h
|
||||
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_dma.h
|
||||
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_spi.h
|
||||
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_spi_dma.h
|
||||
.\objects\external_key.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stdlib.h
|
||||
.\objects\external_key.o: ..\..\..\..\..\component\ble\modules\flash\xc6xxx_fmc_spi.h
|
||||
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_fmc_spi_dma.h
|
||||
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_uart_dma.h
|
||||
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_i2c.h
|
||||
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_sw_i2c.h
|
||||
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_wdt.h
|
||||
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_adc.h
|
||||
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_pwm.h
|
||||
.\objects\external_key.o: ..\app\src\Mode.h
|
||||
.\objects\external_key.o: ..\app\src\PWM.h
|
||||
.\objects\external_key.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\math.h
|
||||
.\objects\external_key.o: ..\app\src\RF433.h
|
||||
.\objects\external_key.o: ..\app\src\timer.h
|
||||
.\objects\external_key.o: ..\app\src\timeslice.h
|
||||
Binary file not shown.
Binary file not shown.
@@ -60,3 +60,4 @@
|
||||
.\objects\fmc_spi.o: ..\app\src\PWM.h
|
||||
.\objects\fmc_spi.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\math.h
|
||||
.\objects\fmc_spi.o: ..\app\src\RF433.h
|
||||
.\objects\fmc_spi.o: ..\app\src\timeslice.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.
@@ -97,3 +97,5 @@
|
||||
.\objects\ota_flash_interface.o: ..\..\..\..\..\component\ble\modules\dbg\api\dbg_trc.h
|
||||
.\objects\ota_flash_interface.o: ..\app\src\ota_protocol.h
|
||||
.\objects\ota_flash_interface.o: ..\app\src\fmc_spi.h
|
||||
.\objects\ota_flash_interface.o: ..\app\src\PWM.h
|
||||
.\objects\ota_flash_interface.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\math.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.
@@ -58,5 +58,80 @@
|
||||
.\objects\rf433.o: ..\app\src\uart.h
|
||||
.\objects\rf433.o: ..\app\src\mode.h
|
||||
.\objects\rf433.o: ..\app\src\timer.h
|
||||
.\objects\rf433.o: ..\app\src\light_transition.h
|
||||
.\objects\rf433.o: ..\app\src\pwm.h
|
||||
.\objects\rf433.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\math.h
|
||||
.\objects\rf433.o: ..\app\src\rf433_decoder.h
|
||||
.\objects\rf433.o: ..\app\src\timeslice.h
|
||||
.\objects\rf433.o: ..\app\src\usr_server.h
|
||||
.\objects\rf433.o: ..\app\api\app_task.h
|
||||
.\objects\rf433.o: ..\..\..\..\..\component\ble\modules\common\api\co_bt_defines.h
|
||||
.\objects\rf433.o: ..\..\..\..\..\component\ble\modules\dbg\api\dbg.h
|
||||
.\objects\rf433.o: ..\..\..\..\..\component\ble\modules\rwip\api\rwip_config.h
|
||||
.\objects\rf433.o: ..\..\..\..\..\component\ble\ip\ble\ll\api\rwble_config.h
|
||||
.\objects\rf433.o: ..\..\..\..\..\component\ble\modules\rwip\api\rwip_config.h
|
||||
.\objects\rf433.o: ..\..\..\..\..\component\ble\ip\ble\hl\inc\rwble_hl_config.h
|
||||
.\objects\rf433.o: ..\..\..\..\..\component\ble\ip\ble\hl\api\rwble_hl_error.h
|
||||
.\objects\rf433.o: ..\..\..\..\..\component\ble\ip\ble\hl\inc\rwprf_config.h
|
||||
.\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: ..\..\..\..\..\component\ble\ip\ble\hl\src\gap\gapm\gapm_int.h
|
||||
.\objects\rf433.o: ..\..\..\..\..\component\ble\ip\ble\hl\api\gapm.h
|
||||
.\objects\rf433.o: ..\..\..\..\..\component\ble\ip\ble\hl\api\gapm_msg.h
|
||||
.\objects\rf433.o: ..\..\..\..\..\component\ble\modules\rwip\api\rwip_task.h
|
||||
.\objects\rf433.o: ..\..\..\..\..\component\ble\ip\ble\hl\api\gap.h
|
||||
.\objects\rf433.o: ..\..\..\..\..\component\ble\plf\refip\src\arch\compiler\gnuarm\compiler.h
|
||||
.\objects\rf433.o: ..\..\..\..\..\component\ble\modules\common\api\co_bt.h
|
||||
.\objects\rf433.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stddef.h
|
||||
.\objects\rf433.o: ..\..\..\..\..\component\ble\modules\common\api\co_lmp.h
|
||||
.\objects\rf433.o: ..\..\..\..\..\component\ble\modules\common\api\co_bt.h
|
||||
.\objects\rf433.o: ..\..\..\..\..\component\ble\modules\common\api\co_hci.h
|
||||
.\objects\rf433.o: ..\..\..\..\..\component\ble\plf\refip\src\arch\compiler\gnuarm\compiler.h
|
||||
.\objects\rf433.o: ..\..\..\..\..\component\ble\modules\common\api\co_error.h
|
||||
.\objects\rf433.o: ..\..\..\..\..\component\ble\modules\common\api\co_list.h
|
||||
.\objects\rf433.o: ..\..\..\..\..\component\ble\plf\refip\src\arch\compiler\gnuarm\compiler.h
|
||||
.\objects\rf433.o: ..\..\..\..\..\component\ble\modules\ke\api\ke_task.h
|
||||
.\objects\rf433.o: ..\..\..\..\..\component\ble\plf\refip\src\arch\compiler\gnuarm\compiler.h
|
||||
.\objects\rf433.o: ..\..\..\..\..\component\ble\modules\ke\api\ke_msg.h
|
||||
.\objects\rf433.o: ..\..\..\..\..\component\ble\plf\refip\src\arch\arch.h
|
||||
.\objects\rf433.o: ..\..\..\..\..\component\ble\plf\refip\src\arch\compiler\gnuarm\compiler.h
|
||||
.\objects\rf433.o: ..\..\..\..\..\component\ble\plf\refip\src\arch\ll\gnuarm\ll.h
|
||||
.\objects\rf433.o: ..\..\..\..\..\component\ble\plf\refip\src\arch\arch.h
|
||||
.\objects\rf433.o: ..\..\..\..\..\component\ble\plf\refip\src\build\ble-full\reg\fw\reg_intc.h
|
||||
.\objects\rf433.o: ..\..\..\..\..\component\ble\plf\refip\src\build\ble-full\reg\fw\_reg_intc.h
|
||||
.\objects\rf433.o: ..\..\..\..\..\component\ble\plf\refip\src\arch\compiler\gnuarm\compiler.h
|
||||
.\objects\rf433.o: ..\..\..\..\..\component\ble\plf\refip\src\driver\reg\reg_access.h
|
||||
.\objects\rf433.o: ..\..\..\..\..\component\ble\modules\common\api\co_utils.h
|
||||
.\objects\rf433.o: ..\..\..\..\..\component\ble\modules\rwip\api\rwip.h
|
||||
.\objects\rf433.o: ..\..\..\..\..\component\ble\plf\refip\src\arch\compiler\gnuarm\compiler.h
|
||||
.\objects\rf433.o: ..\..\..\..\..\component\ble\ip\em\api\em_map.h
|
||||
.\objects\rf433.o: ..\..\..\..\..\component\ble\modules\common\api\co_math.h
|
||||
.\objects\rf433.o: ..\..\..\..\..\component\ble\plf\refip\src\arch\compiler\gnuarm\compiler.h
|
||||
.\objects\rf433.o: ..\..\..\..\..\component\ble\plf\refip\src\build\ble-full\reg\fw\_reg_em_et.h
|
||||
.\objects\rf433.o: ..\..\..\..\..\component\ble\ip\ble\ll\api\em_map_ble.h
|
||||
.\objects\rf433.o: ..\..\..\..\..\component\ble\modules\common\api\co_llcp.h
|
||||
.\objects\rf433.o: ..\..\..\..\..\component\ble\plf\refip\src\build\ble-full\reg\fw\_reg_em_ble_cs.h
|
||||
.\objects\rf433.o: ..\..\..\..\..\component\ble\plf\refip\src\build\ble-full\reg\fw\_reg_em_ble_tx_desc.h
|
||||
.\objects\rf433.o: ..\..\..\..\..\component\ble\plf\refip\src\build\ble-full\reg\fw\_reg_em_ble_rx_desc.h
|
||||
.\objects\rf433.o: ..\..\..\..\..\component\ble\plf\refip\src\build\ble-full\reg\fw\_reg_em_ble_rx_cte_desc.h
|
||||
.\objects\rf433.o: ..\..\..\..\..\component\ble\plf\refip\src\build\ble-full\reg\fw\_reg_em_ble_wpal.h
|
||||
.\objects\rf433.o: ..\..\..\..\..\component\ble\plf\refip\src\build\ble-full\reg\fw\_reg_em_ble_ral.h
|
||||
.\objects\rf433.o: ..\..\..\..\..\component\ble\plf\refip\src\arch\compiler\gnuarm\compiler.h
|
||||
.\objects\rf433.o: ..\..\..\..\..\component\ble\ip\ble\hl\src\gatt\gatt_msg_int.h
|
||||
.\objects\rf433.o: ..\..\..\..\..\component\ble\ip\ble\hl\api\gatt.h
|
||||
.\objects\rf433.o: ..\..\..\..\..\component\ble\plf\refip\src\arch\compiler\gnuarm\compiler.h
|
||||
.\objects\rf433.o: ..\..\..\..\..\component\ble\ip\ble\hl\api\gatt_msg.h
|
||||
.\objects\rf433.o: ..\..\..\..\..\component\ble\plf\refip\src\arch\compiler\gnuarm\compiler.h
|
||||
.\objects\rf433.o: ..\..\..\..\..\component\ble\ip\ble\hl\api\l2cap.h
|
||||
.\objects\rf433.o: ..\..\..\..\..\component\ble\plf\refip\src\arch\compiler\gnuarm\compiler.h
|
||||
.\objects\rf433.o: ..\..\..\..\..\component\ble\ip\ble\hl\api\l2cap_msg.h
|
||||
.\objects\rf433.o: ..\..\..\..\..\component\ble\plf\refip\src\arch\compiler\gnuarm\compiler.h
|
||||
.\objects\rf433.o: ..\..\..\..\..\component\ble\modules\common\api\co_buf.h
|
||||
.\objects\rf433.o: ..\..\..\..\..\component\ble\modules\ke\api\ke_mem.h
|
||||
.\objects\rf433.o: ..\app\src\ota_server.h
|
||||
.\objects\rf433.o: ..\app\api\app_task.h
|
||||
.\objects\rf433.o: ..\..\..\..\..\component\ble\ip\ble\api\xc_gatt_server_api.h
|
||||
.\objects\rf433.o: ..\..\..\..\..\component\ble\ip\ble\hl\src\gatt\gatt_db.h
|
||||
.\objects\rf433.o: ..\..\..\..\..\component\ble\ip\ble\api\xc_gap_api.h
|
||||
.\objects\rf433.o: ..\..\..\..\..\component\ble\ip\ble\hl\api\gapc_msg.h
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,5 @@
|
||||
.\objects\rf433_decoder.o: ..\app\src\rf433_decoder.c
|
||||
.\objects\rf433_decoder.o: ..\app\src\rf433_decoder.h
|
||||
.\objects\rf433_decoder.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stdbool.h
|
||||
.\objects\rf433_decoder.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stdint.h
|
||||
.\objects\rf433_decoder.o: ..\app\src\rf433_decoder_port.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.
@@ -60,6 +60,7 @@
|
||||
.\objects\timeslice.o: ..\app\src\timer.h
|
||||
.\objects\timeslice.o: ..\app\src\mode.h
|
||||
.\objects\timeslice.o: ..\app\src\RF433.h
|
||||
.\objects\timeslice.o: ..\app\src\rf433_decoder.h
|
||||
.\objects\timeslice.o: ..\app\src\ota_flash_interface.h
|
||||
.\objects\timeslice.o: ..\app\src\ota_protocol.h
|
||||
.\objects\timeslice.o: ..\..\..\..\..\component\ble\plf\refip\src\arch\arch.h
|
||||
@@ -137,3 +138,4 @@
|
||||
.\objects\timeslice.o: ..\..\..\..\..\component\ble\ip\ble\hl\src\gatt\gatt_db.h
|
||||
.\objects\timeslice.o: ..\..\..\..\..\component\ble\ip\ble\api\xc_gap_api.h
|
||||
.\objects\timeslice.o: ..\..\..\..\..\component\ble\ip\ble\hl\api\gapc_msg.h
|
||||
.\objects\timeslice.o: ..\app\src\external_key.h
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -63,3 +63,4 @@
|
||||
.\objects\uart_1.o: ..\app\src\rgblight.h
|
||||
.\objects\uart_1.o: ..\app\src\mode.h
|
||||
.\objects\uart_1.o: ..\app\src\timeslice.h
|
||||
.\objects\uart_1.o: ..\app\src\fmc_spi.h
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -128,3 +128,4 @@
|
||||
.\objects\usr_server.o: ..\app\src\Mode.h
|
||||
.\objects\usr_server.o: ..\app\src\PWM.h
|
||||
.\objects\usr_server.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\math.h
|
||||
.\objects\usr_server.o: ..\app\src\fmc_spi.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.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user