60 Commits

Author SHA1 Message Date
wuqi 46e9db0796 解决中性光写flash闪烁问题 2026-07-29 11:27:02 +08:00
wuqi 7b0bf78309 Revert "修复APP切换记忆策略时闪烁"
This reverts commit 550d0987ea.
2026-07-28 17:51:50 +08:00
wuqi eab8e1cc98 Revert "保持蓝牙与中性光运行时写入参数"
This reverts commit d119f8cceb.
2026-07-28 17:51:50 +08:00
wuqi d119f8cceb 保持蓝牙与中性光运行时写入参数 2026-07-28 17:49:22 +08:00
wuqi 550d0987ea 修复APP切换记忆策略时闪烁 2026-07-28 17:36:13 +08:00
wuqi 1676f4b3ad 修复中性光上电瞬时闪烁 2026-07-28 17:19:15 +08:00
wuqi b2e642366c 恢复4aa84e1固件构建布局 2026-07-28 17:09:50 +08:00
wuqi ee4b458933 增加上电三色轮换与记忆策略 2026-07-28 16:35:13 +08:00
wuqi 55a26d7b18 恢复到4aa84e1版本 2026-07-28 16:17:41 +08:00
wuqi 2200a04f05 修复断电轮换保存及蓝牙广播构建 2026-07-28 16:14:32 +08:00
wuqi cb7fe7f041 增加动态亮度长按及断电切换 2026-07-28 15:43:13 +08:00
wuqi 4aa84e178e 适配PWM63D亮度与速度指令 2026-07-28 14:56:00 +08:00
wuqi 1933300dee 配置DWM22蓝牙名称与FFE4特征 2026-07-28 14:40:12 +08:00
wuqi 3dae15c011 为交叠渐变加入中性光 2026-07-28 14:10:42 +08:00
wuqi 71e4bb628a 增加双色交叠渐变模式 2026-07-28 14:03:33 +08:00
wuqi 60ec4838f2 修正呼吸与闪烁模式入口 2026-07-28 13:43:14 +08:00
wuqi 625cdb585d 修正渐变互补与闪烁切换 2026-07-28 13:32:30 +08:00
wuqi e66570c005 扩展十三种灯光效果模式 2026-07-28 13:14:11 +08:00
wuqi 6532524f81 校正三色中性光呼吸峰值 2026-07-28 12:40:18 +08:00
wuqi d80074def7 交错中性光低亮PDM脉冲 2026-07-28 12:33:47 +08:00
wuqi 6b6a72d0ef 统一中性光与单色呼吸周期 2026-07-28 12:26:32 +08:00
wuqi b5495492a7 仅为三色中性光启用低亮PDM 2026-07-28 12:15:52 +08:00
wuqi 44ad781943 三色呼吸恢复为纯PWM输出 2026-07-28 12:03:21 +08:00
wuqi 1516b11029 平滑三色呼吸单色低亮尾部 2026-07-28 11:44:55 +08:00
wuqi 5a29f94c70 三色呼吸全灭后切换颜色 2026-07-28 11:33:02 +08:00
wuqi deb935e544 使用PDM平滑三色呼吸低亮度 2026-07-28 11:14:57 +08:00
wuqi 049adfc05b 平滑三色呼吸颜色交接 2026-07-28 11:03:30 +08:00
wuqi 5edc9d0ba2 仅静态模式保留切换过渡 2026-07-28 10:52:47 +08:00
wuqi 9a8123c310 恢复433接收引脚为GPIO5 2026-07-28 10:42:31 +08:00
wuqi 80fa89da50 提升433弱信号解码响应速度 2026-07-28 10:38:02 +08:00
wuqi 8d3116c2a4 将GPIO18的433初始化移到最后 2026-07-28 10:13:22 +08:00
wuqi 722e9ea88f 将433接收引脚改为GPIO18 2026-07-28 10:10:25 +08:00
wuqi 36d7db331c 忽略已对码遥控器的重复写入 2026-07-27 23:59:47 +08:00
wuqi bb7662fda2 保留最近对码的五个遥控器 2026-07-27 23:54:48 +08:00
wuqi e874a8673e 移植HPW423评分版433解码器 2026-07-27 23:42:21 +08:00
wuqi 241bf50b3f 隔离对码闪烁与灯光状态 2026-07-27 23:19:11 +08:00
wuqi b85b15df17 增加模式切换柔和过渡 2026-07-27 22:54:20 +08:00
wuqi 70979d3023 平滑混合光关机尾段 2026-07-27 22:22:34 +08:00
wuqi f06b247c0d 按46微秒阈值调整混合光亮度 2026-07-27 21:47:01 +08:00
wuqi 7263ad9ebc 按65微秒稳定阈值映射混合光亮度 2026-07-27 21:23:11 +08:00
wuqi bf2b8e4796 移除混合光最低亮度限制 2026-07-27 18:31:57 +08:00
wuqi 7a17f1983e 增加2KHz和50微秒混合脉宽测试 2026-07-27 18:24:56 +08:00
wuqi a1dcf3621e 提高混合光统一最低阈值 2026-07-27 18:16:47 +08:00
wuqi 800473b193 缩短死区并提高混合光最低亮度 2026-07-27 18:06:20 +08:00
wuqi 9b1455209d 按混色比例动态设置最低亮度 2026-07-27 17:57:09 +08:00
wuqi 45cef73611 设置混合光每路最低百分之十 2026-07-27 17:49:56 +08:00
wuqi ce4feeb67e 稳定双色低亮度脉冲 2026-07-27 17:42:32 +08:00
wuqi 2d818fcea2 将最低亮度调整为百分之一 2026-07-27 17:33:44 +08:00
wuqi 20b8bdaad3 提升Gamma调光输出精度 2026-07-27 17:26:41 +08:00
wuqi d351ec3fc2 优化开关机Gamma渐变 2026-07-27 17:03:20 +08:00
wuqi 18f0a2e2a4 优化闪烁和呼吸最低亮度 2026-07-27 13:03:43 +08:00
wuqi 9e64addaec 取消遥控模式循环切换 2026-07-27 12:50:18 +08:00
wuqi e387966863 将遥控色温键改为模式切换 2026-07-27 12:44:00 +08:00
wuqi 38fc1d2ea3 优化亮度平滑过渡 2026-07-27 12:01:22 +08:00
wuqi faa3a1bdc1 增强遥控对码容错 2026-07-27 11:45:07 +08:00
wuqi 0add5422ac 修复遥控对码和速度同步 2026-07-27 11:30:34 +08:00
wuqi ef6a50597b 增加Gamma查表调光 2026-07-26 23:44:12 +08:00
wuqi e5e899a8f1 提升亮度调节精度至百分比 2026-07-26 23:20:44 +08:00
wuqi 9321568920 增加蓝牙状态上报和断链同步 2026-07-26 21:38:07 +08:00
wuqi 56f2c18da4 优化H桥PWM并增加平滑调光 2026-07-26 20:03:55 +08:00
196 changed files with 20510 additions and 17470 deletions
+6
View File
@@ -0,0 +1,6 @@
project/example/ble/ble_peripheral/mdk/codex_build.log
release/ble_peripheral.bin
release/online/*.bin
release/ota/*.bin
tools/offline_burn/download.bin
tools/offline_burn/40-ab-00-cd-01-01_*_1000000.bin
@@ -340,6 +340,10 @@ __RAM_CODE static uint8_t xc_fmc_spi_flash_status(void)
return sta[1];
}
__RAM_CODE __WEAK void xc_fmc_spi_flash_busy_hook(void)
{
}
/**
****************************************************************************************
* @brief xc_fmc_spi_flash_wait_busy
@@ -354,8 +358,14 @@ __RAM_CODE static uint8_t xc_fmc_spi_flash_status(void)
*/
__RAM_CODE static void xc_fmc_spi_flash_wait_busy(void)
{
while ((xc_fmc_spi_flash_status() & PUYA_FLASH_STATUS_WIP_SET))
;
for (;;) {
xc_fmc_spi_flash_busy_hook();
if ((xc_fmc_spi_flash_status() &
PUYA_FLASH_STATUS_WIP_SET) == 0U)
break;
}
xc_fmc_spi_flash_busy_hook();
}
/**
@@ -472,6 +482,30 @@ __RAM_CODE void xc_fmc_spi_flash_erase_page(uint32_t addr)
* @retval void
****************************************************************************************
*/
__RAM_CODE void xc_fmc_spi_flash_write_16bytes(uint32_t addr, uint8_t *data)
{
uint8_t cmd[16 + 4] = {0};
xc_fmc_spi_flash_wait_busy();
xc_fmc_spi_flash_write_enable();
xc_fmc_spi_flash_wait_busy();
cmd[0] = CMD_PAGE_PROGRAM;
cmd[1] = addr >> 16;
cmd[2] = addr >> 8;
cmd[3] = addr;
ram_memcpy_bytes(&cmd[4], data, 16);
xc_fmc_status_wait_idle();
xc_fmc_spi_enable(FMC_SSI_CTRL0_DFS_LEN_32BIT);
xc_fmc_spi_write_nbyte(cmd, sizeof(cmd));
xc_fmc_spi_flash_wait_busy();
xc_fmc_spi_disable();
}
__RAM_CODE void xc_fmc_spi_flash_write_page(uint32_t addr, uint8_t *data,
uint16_t size)
{
@@ -293,6 +293,7 @@ void xc_fmc_spi_flash_wait_busy(void);
void xc_fmc_spi_flash_write_enable(void);
void xc_fmc_spi_flash_erase_sector(uint32_t addr);
void xc_fmc_spi_flash_erase_page(uint32_t addr);
void xc_fmc_spi_flash_write_16bytes(uint32_t addr, uint8_t *data);
void xc_fmc_spi_flash_write_page(uint32_t addr, uint8_t *buff,
uint16_t size);
void xc_fmc_spi_flash_read_page(uint32_t addr, uint8_t *buff,
@@ -171,7 +171,7 @@ void xc_timer_stop(uint8_t reg_idx)
timer_tcr__tes__setf(reg_idx, TIMER_TCR_TES_DISABLE);
}
void TIMER0_Handler(void)
__RAM_CODE void TIMER0_Handler(void)
{
(void)timer_tic_get(TIMER0_IDX);
if (timer_n_callback[0] != NULL)
@@ -192,7 +192,7 @@ void TIMER2_Handler(void)
timer_n_callback[2](NULL);
}
void TIMER3_Handler(void)
__RAM_CODE void TIMER3_Handler(void)
{
(void)timer_tic_get(TIMER3_IDX);
if (timer_n_callback[3] != NULL)
+5
View File
@@ -0,0 +1,5 @@
@echo off
setlocal
cd /d "%~dp0"
powershell -ExecutionPolicy Bypass -File "%~dp0tools\make_release_bin.ps1" %*
exit /b %errorlevel%
@@ -397,7 +397,7 @@
/// Default Device Name
#define APP_DFLT_DEVICE_NAME ("PWM32EPRO") //
#define APP_DFLT_DEVICE_NAME ("DWM22") //
#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")
+267 -188
View File
@@ -7,9 +7,11 @@
#include "timeslice.h"
#include "RF433.h"
#include "usr_server.h"
#include "light_transition.h"
uint16_t time_1[11]={8,10,12,14,16,18,20,22,24,26,26};
static const uint16_t time_1_neutral[11]={12,15,18,21,24,27,30,33,35,38,38};
uint16_t time_2[11]={100,200,300,400,500,600,700,800,900,1000,1000};
uint16_t time_3[11]={200, 350, 450, 550, 650, 750, 850, 950, 1200,1500,1500};
@@ -20,17 +22,18 @@ uint8_t direction = 1; //
uint8_t choose_mode_falsg=0; //模式值
uint8_t choose_mode_bh=0; //模式变化
static uint8_t mode_entry_initialized;
uint16_t Color_table_static[3][2]={
{10,0}, //暖光
{4,4}, //中性光
{0,10}, //冷光
{100,0}, // warm light
{50,50}, // neutral light
{0,100}, // cool light
};
uint16_t Color_table[3][2]={ //动态时候的数组
{100,0}, //暖光
{40,40}, //中性光
{50,50}, //中性光
{0,100}, //冷光
};
@@ -46,15 +49,15 @@ void Set_timing(){
}
}
void Start_PWM(){
Light_Transition_RequestOn();
deviceStatus=POWERON;
startTimer(&timer1,1);
}
void Stop_PWM(){
Light_Transition_RequestOff();
deviceStatus=POWEROFF;
xc_gpio_write_pin(IO_PWM_W, GPIO_PIN_RESET);
xc_gpio_write_pin(IO_PWM_C, GPIO_PIN_RESET);
}
@@ -62,96 +65,110 @@ void set_mode(){
if(choose_mode_bh==0){
choose_mode_bh=1;
switch(choose_mode_falsg){
//
case 0:
//暖光
W_PWM=Color_table_static[0][0];
C_PWM=Color_table_static[0][1];
driveMode=1;//切换为暖光的底层输出
Mode=mode0;
W_PWM=100U; C_PWM=0U; driveMode=1U; Mode=mode0;
break;
case 1:
//冷光
W_PWM=Color_table_static[2][0];
C_PWM=Color_table_static[2][1];
driveMode=2;//切换为冷光的底层输出
Mode=mode0;
W_PWM=0U; C_PWM=100U; driveMode=2U; Mode=mode0;
break;
case 2:
//中性光
W_PWM=Color_table_static[1][0];
C_PWM=Color_table_static[1][1];
driveMode=0;//切换为中性光的底层输出
Mode=mode0;
W_PWM=50U; C_PWM=50U; driveMode=0U; Mode=mode0;
break;
case 3:
//暖光呼吸
W_PWM=Color_table[0][0];
C_PWM=Color_table[0][1];
driveMode=1;//切换为暖光的底层输出
direction=1;//呼吸方向恢复默认值
Mode=mode1;
W_PWM=1U; C_PWM=0U; driveMode=1U; direction=0U; Mode=mode1;
break;
case 4:
//冷光呼吸
W_PWM=Color_table[2][0];
C_PWM=Color_table[2][1];
driveMode=2;//切换为中性光的底层输出
direction=1;//呼吸方向恢复默认值
Mode=mode1;
W_PWM=0U; C_PWM=1U; driveMode=2U; direction=0U; Mode=mode1;
break;
case 5:
//三个色温轮询呼吸//先从暖光开始呼吸
W_PWM=Color_table[0][0];
C_PWM=Color_table[0][1];
driveMode=1;//切换为暖光的底层输出
direction=1;//呼吸方向恢复默认值
Mode=mode1;
W_PWM=1U; C_PWM=1U; driveMode=0U; direction=0U; Mode=mode1;
break;
case 6:
//暖光跳变
W_PWM=Color_table[0][0];
C_PWM=Color_table[0][1];
driveMode=1;//切换为暖光的底层输出
direction=1;//呼吸方向恢复默认值
Mode=mode2;
W_PWM=1U; C_PWM=0U; driveMode=1U; direction=0U; Mode=mode1;
break;
case 7:
//中性光跳变
W_PWM=Color_table[1][0];
C_PWM=Color_table[1][1];
driveMode=0;//切换为中性光的底层输出
Mode=mode2;
W_PWM=100U; C_PWM=0U; driveMode=1U; direction=1U; Mode=mode3;
break;
case 8:
//冷光跳变
W_PWM=Color_table[2][0];
C_PWM=Color_table[2][1];
driveMode=2;//切换为中性光的底层输出
direction=1;//呼吸方向恢复默认值
Mode=mode2;
W_PWM=100U; C_PWM=0U; driveMode=1U; direction=0U; Mode=mode3;
break;
case 9:
//暖光中性光冷交替跳变,先从暖光跳变
W_PWM=Color_table[0][0];
C_PWM=Color_table[0][1];
driveMode=1;//切换为暖光的底层输出
direction=1;//呼吸方向恢复默认值
Mode=mode2;
W_PWM=100U; C_PWM=0U; driveMode=1U; direction=1U; Mode=mode2;
break;
case 10://圆环模式
case 10:
W_PWM=0U; C_PWM=100U; driveMode=2U; direction=1U; Mode=mode2;
break;
case 11:
W_PWM=50U; C_PWM=50U; driveMode=0U; direction=1U; Mode=mode2;
break;
case 12:
W_PWM=100U; C_PWM=0U; driveMode=1U; direction=2U; Mode=mode2;
break;
case 13:
W_PWM=100U; C_PWM=0U; driveMode=1U; direction=2U; Mode=mode2;
break;
case CUSTOM_TEMPERATURE_MODE:
Mode=mode0;
break;
default:
choose_mode_falsg=0U;
W_PWM=100U; C_PWM=0U; driveMode=1U; Mode=mode0;
break;
}
if(mode_entry_initialized)
{
if(choose_mode_falsg <= 2U)
{
Light_Transition_BeginModeChange();
}
else if(choose_mode_falsg == CUSTOM_TEMPERATURE_MODE)
{
/*
* APP CCT packets can arrive continuously while the color
* ring is dragged. Restart the same 200 ms linear transition
* used by static mode changes from the current visible
* output, so the latest W/C target is followed without a
* discontinuity.
*/
Light_Transition_BeginModeChange();
}
else
{
Light_Transition_ModeActive=0U;
Light_Transition_SyncBrightness(Brightness);
}
if(Mode==mode1){
if(choose_mode_falsg==5U)
startTimer(&timer1,time_1_neutral[Speed]);
else
startTimer(&timer1,time_1[Speed]);
}else if(Mode==mode2){
startTimer(&timer1,time_2[Speed]);
}else if(Mode==mode3){
startTimer(&timer1,time_1[Speed]);
}else{
startTimer(&timer1,1U);
}
}
else
{
mode_entry_initialized=1;
}
}
Light_Transition_Task();
}
void Mode0(){ //常量
UpdateDisplay();
(void)0;/* transition */
}
#define THREE_COLOR_WAIT_NEUTRAL 6U
#define THREE_COLOR_WAIT_COLD 7U
#define THREE_COLOR_WAIT_WARM 8U
#define OVERLAP_GRADIENT_LEVEL 40U
#define OVERLAP_NEUTRAL_LOW 20U
#define OVERLAP_NEUTRAL_PEAK 50U
static uint8_t breathespeed_flag=0; //该变量只是用来处理三种颜色呼吸时候,对中性光的速度变大
static void breathe_fun(uint16_t *PWM_1, uint16_t *PWM_2, uint8_t flag) {
if (flag == 0) {
@@ -190,84 +207,85 @@ static void breathe_fun(uint16_t *PWM_1, uint16_t *PWM_2, uint8_t flag) {
// }
}
}
void Mode1(){ //呼吸
if(choose_mode_falsg==3){ //暖光呼吸
breathe_fun(&C_PWM,&W_PWM,0);
}else if(choose_mode_falsg==4){//冷光呼吸
breathe_fun(&W_PWM,&C_PWM,0);
}else if(choose_mode_falsg==5){
switch (direction) {
case 0:
breathespeed_flag=0;
W_PWM += 1;
C_PWM = 0;
if (W_PWM >= 100) {
direction = 1;
static void neutral_breathe_fun(void)
{
breathespeed_flag=1U;
if(direction==1U){
if(W_PWM>1U){ W_PWM--; C_PWM--; }
if(W_PWM<=1U){ W_PWM=1U; C_PWM=1U; direction=0U; }
}else{
if(W_PWM<68U){ W_PWM++; C_PWM++; }
if(W_PWM>=68U){ W_PWM=68U; C_PWM=68U; direction=1U; }
}
break;
case 1:
breathespeed_flag=0;
W_PWM -= 1;
C_PWM = 0;
if (W_PWM <= 1) {
direction = 2;
driveMode=0;
W_PWM = 1;
C_PWM = 0;
}
break;
case 2:
breathespeed_flag=1;
W_PWM += 1;
C_PWM += 1;
if (W_PWM >= 40) {
W_PWM=40;
C_PWM=40;
direction = 3;
}
break;
case 3:
breathespeed_flag=1;
W_PWM -= 1;
C_PWM -= 1;
if (W_PWM <=1) {
driveMode=2;
direction = 4;
W_PWM = 1;
C_PWM = 1;
}
break;
case 4:
breathespeed_flag=0;
W_PWM = 0;
C_PWM += 1;
if (C_PWM >= 100) {
direction = 5;
}
break;
case 5:
breathespeed_flag=0;
W_PWM = 0;
C_PWM -= 1;
if (C_PWM <=1){
direction = 0;
driveMode=1;
W_PWM = 1;
C_PWM = 1;
}
break;
}
}
//UpdateDisplay();
UpdateDisplay_1();
}
void Mode1(void)
{
if(choose_mode_falsg==3U){
breathespeed_flag=0U;
breathe_fun(&C_PWM,&W_PWM,0U);
}else if(choose_mode_falsg==4U){
breathespeed_flag=0U;
breathe_fun(&W_PWM,&C_PWM,0U);
}else if(choose_mode_falsg==5U){
neutral_breathe_fun();
}else if(choose_mode_falsg==6U){
switch(direction){
case 0U:
breathespeed_flag=0U;
W_PWM++; C_PWM=0U;
if(W_PWM>=100U){ W_PWM=100U; direction=1U; }
break;
case 1U:
breathespeed_flag=0U;
if(W_PWM>0U) W_PWM--;
C_PWM=0U;
if(W_PWM<=1U){ W_PWM=0U; direction=THREE_COLOR_WAIT_COLD; }
break;
case 4U:
breathespeed_flag=0U;
W_PWM=0U; C_PWM++;
if(C_PWM>=100U){ C_PWM=100U; direction=5U; }
break;
case 5U:
breathespeed_flag=0U;
W_PWM=0U;
if(C_PWM>0U) C_PWM--;
if(C_PWM<=1U){ C_PWM=0U; direction=THREE_COLOR_WAIT_NEUTRAL; }
break;
case 2U:
breathespeed_flag=1U;
W_PWM++; C_PWM++;
if(W_PWM>=68U){ W_PWM=68U; C_PWM=68U; direction=3U; }
break;
case 3U:
breathespeed_flag=1U;
if(W_PWM>0U) W_PWM--;
if(C_PWM>0U) C_PWM--;
if(W_PWM<=1U){ W_PWM=0U; C_PWM=0U; direction=THREE_COLOR_WAIT_WARM; }
break;
case THREE_COLOR_WAIT_COLD:
breathespeed_flag=0U; W_PWM=0U; C_PWM=0U;
if(W_PWM_duty==0U && C_PWM_duty==0U){
driveMode=2U; C_PWM=1U; direction=4U;
}
break;
case THREE_COLOR_WAIT_NEUTRAL:
breathespeed_flag=1U; W_PWM=0U; C_PWM=0U;
if(W_PWM_duty==0U && C_PWM_duty==0U){
driveMode=0U; W_PWM=1U; C_PWM=1U; direction=2U;
}
break;
case THREE_COLOR_WAIT_WARM:
default:
breathespeed_flag=0U; W_PWM=0U; C_PWM=0U;
if(W_PWM_duty==0U && C_PWM_duty==0U){
driveMode=1U; W_PWM=1U; direction=0U;
}
break;
}
}
}
void jump_fun(uint16_t *PWM_1, uint16_t *PWM_2, uint8_t flag){
if(flag==0){
*PWM_1 = 0;
@@ -280,8 +298,8 @@ void jump_fun(uint16_t *PWM_1, uint16_t *PWM_2, uint8_t flag){
}
}else if(flag==1){
if (!direction){
*PWM_1 = 40;
*PWM_2 = 40;
*PWM_1 = 50;
*PWM_2 = 50;
direction = 1;
} else {
*PWM_1 = 0;
@@ -291,58 +309,117 @@ void jump_fun(uint16_t *PWM_1, uint16_t *PWM_2, uint8_t flag){
}
}
void Mode2(){ //跳变
//printf("dd=%d--%d\r\n",W_PWM,W_PWM);
if(choose_mode_falsg==6){
jump_fun(&C_PWM,&W_PWM,0); //暖光跳变
}else if(choose_mode_falsg==7){
jump_fun(&W_PWM,&C_PWM,1); //中光跳变
}else if(choose_mode_falsg==8){
jump_fun(&W_PWM,&C_PWM,0); //冷光跳变
}else if(choose_mode_falsg==9){
switch (direction) {
case 1:
W_PWM =100;
C_PWM = 0;
direction = 2;
void Mode2(void)
{
if(choose_mode_falsg==9U){
jump_fun(&C_PWM,&W_PWM,0U);
}else if(choose_mode_falsg==10U){
jump_fun(&W_PWM,&C_PWM,0U);
}else if(choose_mode_falsg==11U){
jump_fun(&W_PWM,&C_PWM,1U);
}else if(choose_mode_falsg==12U){
switch(direction){
case 1U:
W_PWM=100U; C_PWM=0U; driveMode=1U; direction=2U;
break;
case 2:
W_PWM = 0;
C_PWM = 0;
direction = 3;
driveMode=0;
case 2U:
W_PWM=0U; C_PWM=100U; driveMode=2U; direction=3U;
break;
case 3:
W_PWM =40;
C_PWM =40;
direction = 4;
default:
W_PWM=50U; C_PWM=50U; driveMode=0U; direction=1U;
break;
case 4:
W_PWM =0;
C_PWM =0;
direction = 5;
driveMode=2;
}
}else if(choose_mode_falsg==13U){
switch(direction){
case 1U:
W_PWM=100U; C_PWM=0U; driveMode=1U; direction=2U;
break;
case 5:
W_PWM = 0;
C_PWM = 100;
direction = 6;
case 2U:
W_PWM=0U; C_PWM=0U; driveMode=2U; direction=3U;
break;
case 6:
W_PWM = 0;
C_PWM = 0;
direction = 1;
driveMode=1;
case 3U:
W_PWM=0U; C_PWM=100U; direction=4U;
break;
case 4U:
W_PWM=0U; C_PWM=0U; driveMode=0U; direction=5U;
break;
case 5U:
W_PWM=50U; C_PWM=50U; direction=6U;
break;
default:
W_PWM=0U; C_PWM=0U; driveMode=1U; direction=1U;
break;
}
}
UpdateDisplay_1();
}
void Mode3(){ //爆闪 //无
UpdateDisplay();
void Mode3(void)
{
if(choose_mode_falsg==7U){
if(direction==1U){
if(C_PWM<100U) C_PWM++;
W_PWM=100U-C_PWM;
if(C_PWM>=100U){ C_PWM=100U; W_PWM=0U; direction=0U; }
}else{
if(C_PWM>0U) C_PWM--;
W_PWM=100U-C_PWM;
if(C_PWM==0U){ W_PWM=100U; direction=1U; }
}
}else if(choose_mode_falsg==8U){
switch(direction){
case 0U:
C_PWM=0U; driveMode=1U;
if(W_PWM>OVERLAP_GRADIENT_LEVEL) W_PWM--;
if(W_PWM<=OVERLAP_GRADIENT_LEVEL){ W_PWM=OVERLAP_GRADIENT_LEVEL; direction=1U; }
break;
case 1U:
if(W_PWM>0U){ W_PWM--; C_PWM++; }
driveMode=0U;
if(W_PWM==0U){ C_PWM=OVERLAP_GRADIENT_LEVEL; driveMode=2U; direction=2U; }
break;
case 2U:
W_PWM=0U; driveMode=2U;
if(C_PWM<100U) C_PWM++;
if(C_PWM>=100U){ C_PWM=100U; direction=3U; }
break;
case 3U:
W_PWM=0U; driveMode=2U;
if(C_PWM>OVERLAP_GRADIENT_LEVEL) C_PWM--;
if(C_PWM<=OVERLAP_GRADIENT_LEVEL){ C_PWM=OVERLAP_GRADIENT_LEVEL; direction=4U; }
break;
case 4U:
if(W_PWM<OVERLAP_NEUTRAL_LOW && C_PWM>OVERLAP_NEUTRAL_LOW){ W_PWM++; C_PWM--; }
driveMode=0U;
if(W_PWM>=OVERLAP_NEUTRAL_LOW){ W_PWM=OVERLAP_NEUTRAL_LOW; C_PWM=OVERLAP_NEUTRAL_LOW; direction=5U; }
break;
case 5U:
if(W_PWM<OVERLAP_NEUTRAL_PEAK){ W_PWM++; C_PWM++; }
driveMode=0U;
if(W_PWM>=OVERLAP_NEUTRAL_PEAK){ W_PWM=OVERLAP_NEUTRAL_PEAK; C_PWM=OVERLAP_NEUTRAL_PEAK; direction=6U; }
break;
case 6U:
if(W_PWM>OVERLAP_NEUTRAL_LOW){ W_PWM--; C_PWM--; }
driveMode=0U;
if(W_PWM<=OVERLAP_NEUTRAL_LOW){ W_PWM=OVERLAP_NEUTRAL_LOW; C_PWM=OVERLAP_NEUTRAL_LOW; direction=7U; }
break;
case 7U:
if(C_PWM>0U){ C_PWM--; W_PWM++; }
driveMode=0U;
if(C_PWM==0U){ W_PWM=OVERLAP_GRADIENT_LEVEL; driveMode=1U; direction=8U; }
break;
case 8U:
default:
C_PWM=0U; driveMode=1U;
if(W_PWM<100U) W_PWM++;
if(W_PWM>=100U){ W_PWM=100U; direction=0U; }
break;
}
}else{
return;
}
if(C_PWM==0U) driveMode=1U;
else if(W_PWM==0U) driveMode=2U;
else driveMode=0U;
}
pfunc modefunctin[] = { //模式切换,一共15个模式
Mode0,
@@ -351,6 +428,8 @@ pfunc modefunctin[] = { //ģʽ
Mode3,
};
void choice_mode(){
if(choose_mode_bh==0U) return;
if(Light_Transition_ModeActive || Light_Transition_FeedbackActive()) return;
if (!timer1.active && timer1.count == 0){
if(Mode==mode0){
startTimer(&timer1,1);
@@ -358,13 +437,13 @@ void choice_mode(){
if(breathespeed_flag==0){
startTimer(&timer1,time_1[Speed]);
}else {
startTimer(&timer1,time_1[Speed]+10);
startTimer(&timer1,time_1_neutral[Speed]);
}
}else if(Mode==mode2){
startTimer(&timer1,time_2[Speed]);
}else if(Mode==mode3){
startTimer(&timer1,time_3[Speed]);//
startTimer(&timer1,time_1[Speed]);//
}
modefunctin[Mode]();
@@ -13,6 +13,10 @@ extern "C" {
#include <stdint.h>
typedef void (*pfunc)(void);
#define EFFECT_MODE_MIN 0U
#define EFFECT_MODE_MAX 13U
#define CUSTOM_TEMPERATURE_MODE 14U
extern uint8_t deviceStatus; //开机标志位
extern uint8_t Mode; //mode0 1 2 3 4
@@ -31,7 +31,7 @@ pwm_ch_cap_type_t pwm_ch_cap_type;
uint16_t timeCnt=0;
uint16_t W_PWM = 10;//初始化暖光
uint16_t W_PWM = 100;//初始化暖光
uint16_t C_PWM = 0;
@@ -41,7 +41,7 @@ uint16_t deadTime_W = _deadTime;
uint8_t driveMode=1;
uint8_t PWMMAX=100; //最大占空比
uint8_t Brightness=10;
uint8_t Brightness=BRIGHTNESS_MAX_PERCENT;
// 切换 PWM 输出管脚,蓝牙调用此方法,切换设备输出线序
uint16_t W_PWM_duty;//初始化暖光
@@ -56,31 +56,6 @@ void switch_pwm_pins(uint8_t red_pwm, uint8_t green_pwm, uint8_t blue_pwm)
float brightness_table[101] = {
0.006f, 0.006f, 0.006f, 0.006f, 0.006f,
0.006f, 0.006f, 0.006f, 0.007f, 0.008f,
0.009f, 0.010f, 0.011f, 0.013f, 0.015f,
0.018f, 0.020f, 0.023f, 0.026f, 0.029f,
0.032f, 0.036f, 0.039f, 0.043f, 0.047f,
0.052f, 0.056f, 0.061f, 0.066f, 0.071f,
0.076f, 0.082f, 0.087f, 0.093f, 0.099f,
0.106f, 0.112f, 0.119f, 0.126f, 0.133f,
0.141f, 0.148f, 0.156f, 0.164f, 0.173f,
0.181f, 0.190f, 0.199f, 0.208f, 0.218f,
0.227f, 0.237f, 0.247f, 0.258f, 0.268f,
0.279f, 0.290f, 0.302f, 0.313f, 0.325f,
0.337f, 0.349f, 0.362f, 0.375f, 0.388f,
0.401f, 0.414f, 0.428f, 0.442f, 0.456f,
0.471f, 0.485f, 0.500f, 0.516f, 0.531f,
0.547f, 0.563f, 0.579f, 0.595f, 0.612f,
0.629f, 0.646f, 0.664f, 0.681f, 0.699f,
0.718f, 0.736f, 0.755f, 0.774f, 0.793f,
0.813f, 0.832f, 0.852f, 0.873f, 0.893f,
0.914f, 0.935f, 0.957f, 0.978f, 1.000f,1.000f
};
void _PWM_INIT(){
GPIO_InitCfg_t GPIO_InitCfg = { 0 }; // 清零初始化配置结构体
@@ -115,37 +90,43 @@ void PWM_SetDuty(uint8_t PWMX ,uint8_t duty) {
// }
}
void UpdateDisplay(void) //静态更新 可以调节亮度
static uint16_t scale_display_value(uint16_t value)
{
W_PWM_duty = W_PWM * Brightness;
C_PWM_duty = C_PWM * Brightness;
if(value > 100U) value = 100U;
if(Brightness >= BRIGHTNESS_MAX_PERCENT) return value;
return (uint16_t)(((uint32_t)value * Brightness + 50U) / 100U);
}
void UpdateDisplay_1(void) //动态更新 不可以调节亮度,只能调节速度
void UpdateDisplay(void) // static update with global brightness
{
W_PWM_duty = W_PWM;
C_PWM_duty = C_PWM;
// printf("dd=%d--%d--%d-%d-%d\r\n",choose_mode_falsg,W_PWM,C_PWM,driveMode,Brightness);
W_PWM_duty = scale_display_value(W_PWM);
C_PWM_duty = scale_display_value(C_PWM);
}
void temperature(uint8_t data) //更新
void UpdateDisplay_1(void) // dynamic update with global brightness
{
driveMode=0;
if(data<57&&data>=16){C_PWM= 0;W_PWM = 10;driveMode=1;}
else if(data<77&&data>=57){C_PWM= 1;W_PWM = 7;}
else if(data<101&&data>=77){C_PWM= 2;W_PWM = 6;}
else if(data<123&&data>=101){C_PWM= 3;W_PWM = 5;}
else if(data<145&&data>=123){C_PWM= 4;W_PWM = 4;}
else if(data<167&&data>=145){C_PWM= 5;W_PWM = 3;}
else if(data<194&&data>=167){C_PWM= 6;W_PWM = 2;}
else if(data<210&&data>=194){C_PWM= 7;W_PWM = 1;}
else if(data>=210){C_PWM= 10;W_PWM = 0;driveMode=2;}
//printf("datat=%d-%d-%d\r\n",data,C_PWM,W_PWM);
//data = 0;
W_PWM_duty = scale_display_value(W_PWM);
C_PWM_duty = scale_display_value(C_PWM);
}
void temperature(uint8_t data) // 0=cold, 255=warm
{
W_PWM = (uint16_t)(((uint32_t)data * 100U + 127U) / 255U);
C_PWM = 100U - W_PWM;
if(W_PWM >= 100U)
{
driveMode = 1;
}
else if(C_PWM >= 100U)
{
driveMode = 2;
}
else
{
driveMode = 0;
}
}
/**
* @brief app_pwm_init
* @details
@@ -65,6 +65,13 @@ extern uint8_t driveMode;
extern uint8_t PWMMAX;
extern uint8_t Brightness;
#define BRIGHTNESS_MIN_PERCENT 1U
#define BRIGHTNESS_MAX_PERCENT 100U
#define BRIGHTNESS_RF_STEP_PERCENT 10U
#define SPEED_MIN_LEVEL 0U
#define SPEED_MAX_LEVEL 9U
#define DEVIATION_FREQ 10
#define DEVIATION_DUTYCYCLE 10
@@ -136,6 +143,13 @@ void switch_pwm_pins(uint8_t red_pwm, uint8_t green_pwm, uint8_t blue_pwm);
void adc_Init();
void My_ADC_Get_Value();
void gpio_pullup_input_inter_test();
void Bridge_Init(void);
void Bridge_Off(void);
void Bridge_Service_1ms(void);
void Bridge_Deadtime_Expired(void);
void Bridge_FlashBlank_Request(void);
uint8_t Bridge_FlashBlank_Ready(void);
void Bridge_FlashBlank_Resume(void);
#ifdef __cplusplus
}
#endif
@@ -98,7 +98,7 @@
//#define RF_DATA P15//RF433接收引脚,根据具体单片机定义引脚
#define RF_DATA xc_gpio_read_pin(GPIO_5) //RF433接收引脚,根据具体单片机定义引脚
#define RF_DATA xc_gpio_read_pin(RF433_PIN) //RF433接收引脚,根据具体单片机定义引脚
#define RF433_PIN GPIO_5 //RF433接收引脚,根据具体单片机定义引脚
#define RF_dd GPIO_0 //
+327 -195
View File
@@ -4,7 +4,10 @@
#include "xc_drv_uart.h"
#include "mode.h"
#include "timer.h"
#include "light_transition.h"
#include "pwm.h"
#include "rf433_decoder.h"
#include "timeslice.h"
union rf433_flag rf_flag = {0};
unsigned char high_level_time;
unsigned char low_level_time;
@@ -75,105 +78,266 @@ void rf433_gpio_init(){
}
static uint8_t ssse=0;
static volatile uint16_t rf_frame_sequence;
static uint16_t pair_last_frame_sequence;
static uint32_t pair_candidate_data;
static uint32_t pair_alternate_data;
static uint8_t pair_candidate_valid;
static uint8_t pair_alternate_count;
static uint8_t pair_frame_silence_ticks;
static uint8_t pairing_feedback_active;
static uint8_t pairing_feedback_on;
static uint8_t pairing_feedback_transitions;
static uint16_t pairing_feedback_elapsed_ms;
static uint16_t pairing_feedback_interval_ms;
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;
#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)))
uint8_t long_flag_s=0;
// 在固定大小数组中添加新元素(滑动窗口)
void addToFixedArray(uint8_t arr[], uint8_t newValue) {
void _433_fun(void);
// Keep paired addresses ordered from oldest to newest.
static uint8_t Pairing_Address_IsEmpty(uint8_t high, uint8_t low)
{
return ((high == 0U && low == 0U) ||
(high == 0xffU && low == 0xffU));
}
static uint8_t Pairing_Address_AddNew(uint8_t high, uint8_t low)
{
uint8_t next_h[5];
uint8_t next_l[5];
uint8_t count = 0U;
uint8_t i;
// 所有元素向后移动一位
for( i = 4; i > 0; i--) {
arr[i] = arr[i - 1];
for(i = 0U; i < 5U; i++)
{
if(adress_H_array[i] == high && adress_L_array[i] == low)
{
return 0U;
}
}
// 在头部插入新值
arr[0] = newValue;
for(i = 0U; i < 5U; i++)
{
if(Pairing_Address_IsEmpty(adress_H_array[i], adress_L_array[i])) continue;
next_h[count] = adress_H_array[i];
next_l[count] = adress_L_array[i];
count++;
}
if(count >= 5U)
{
for(i = 0U; i < 4U; i++)
{
next_h[i] = next_h[i + 1U];
next_l[i] = next_l[i + 1U];
}
count = 4U;
}
next_h[count] = high;
next_l[count] = low;
count++;
for(i = 0U; i < 5U; i++)
{
if(i < count)
{
adress_H_array[i] = next_h[i];
adress_L_array[i] = next_l[i];
}
else
{
adress_H_array[i] = 0xffU;
adress_L_array[i] = 0xffU;
}
}
return 1U;
}
static void Pairing_Feedback_Apply(uint8_t on)
{
Light_Transition_SetFeedback(1U, on);
}
static void Pairing_Feedback_Restore(void)
{
Light_Transition_SetFeedback(0U, 0U);
if(deviceStatus == POWERON)
{
Light_Transition_BeginModeChange();
startTimer(&timer1, 1U);
}
}
static void Pairing_Feedback_Start(uint16_t interval_ms)
{
if(pairing_feedback_active) return;
pair_deferred_command = 0U;
pairing_feedback_active = 1U;
pairing_feedback_on = 1U;
pairing_feedback_transitions = 6U;
pairing_feedback_elapsed_ms = 0U;
pairing_feedback_interval_ms = interval_ms;
Pairing_Feedback_Apply(1U);
}
static void Pairing_Feedback_Task(void)
{
if(!pairing_feedback_active) return;
pairing_feedback_elapsed_ms += 3U;
if(pairing_feedback_elapsed_ms < pairing_feedback_interval_ms) return;
pairing_feedback_elapsed_ms = 0U;
if(pairing_feedback_transitions <= 1U)
{
pairing_feedback_active = 0U;
pairing_feedback_transitions = 0U;
Pairing_Feedback_Restore();
return;
}
pairing_feedback_transitions--;
pairing_feedback_on = pairing_feedback_on ? 0U : 1U;
Pairing_Feedback_Apply(pairing_feedback_on);
}
static uint8_t Pairing_IsTriggerCommand(uint8_t command)
{
return command == Brightness_H || command == Brightness_L ||
command == B_Brightness_H || command == B_Brightness_L ||
command == F_Brightness_10 || command == F_Brightness_100;
}
static void Pairing_Replay_Deferred(void)
{
uint8_t current_res_data;
uint32_t current_receive_data;
if(!pair_deferred_command) return;
current_res_data = res_data;
current_receive_data = receive_data;
res_data = pair_deferred_res_data;
receive_data = pair_deferred_receive_data;
pair_deferred_command = 0U;
pair_command_replay = 1U;
_433_fun();
pair_command_replay = 0U;
res_data = current_res_data;
receive_data = current_receive_data;
}
static void Pairing_Candidate_Reset(void)
{
long_press_cnt = 0U;
pair_candidate_data = 0U;
pair_alternate_data = 0U;
pair_candidate_valid = 0U;
pair_alternate_count = 0U;
pair_frame_silence_ticks = 0U;
pair_deferred_command = 0U;
}
static void Encoder_key_NoCode(){
uint8_t i=0,j=0,isok=0,updata=0;
uint16_t times_s=0;
uint8_t pairing_data_changed=0U;
if((res_data==Brightness_H||res_data==Brightness_L||res_data==B_Brightness_H||res_data==B_Brightness_L||res_data==F_Brightness_10||res_data==F_Brightness_100)&&time_5s<=40000&&ssse==0){
if(pair_frame_silence_ticks < 0xffU) pair_frame_silence_ticks++;
if(pair_frame_silence_ticks > PAIR_FRAME_SILENCE_TICKS)
{
if(pair_candidate_valid &&
long_press_cnt < PAIR_HOLD_FRAME_COUNT)
Pairing_Replay_Deferred();
Pairing_Candidate_Reset();
}
if(rf_frame_sequence == pair_last_frame_sequence) return;
pair_last_frame_sequence = rf_frame_sequence;
if(ssse != 0U || time_5s > PAIRING_WINDOW_TICKS) return;
if(!(res_data==Brightness_H||res_data==Brightness_L||
res_data==B_Brightness_H||res_data==B_Brightness_L||
res_data==F_Brightness_10||res_data==F_Brightness_100))
{
return;
}
if(!pair_candidate_valid)
{
pair_candidate_data = receive_data;
pair_candidate_valid = 1U;
long_press_cnt = 1U;
pair_alternate_count = 0U;
pair_frame_silence_ticks = 0U;
}
else if(pair_candidate_data == receive_data)
{
long_press_cnt++;
pair_alternate_count = 0U;
pair_frame_silence_ticks = 0U;
}
else
{
if(pair_alternate_data == receive_data)
{
pair_alternate_count++;
}
else
{
pair_alternate_data = receive_data;
pair_alternate_count = 1U;
}
if(long_press_cnt>200){
time_5s=40011;
if(pair_alternate_count >= 2U)
{
pair_candidate_data = pair_alternate_data;
long_press_cnt = pair_alternate_count;
pair_alternate_count = 0U;
pair_frame_silence_ticks = 0U;
}
}
if(long_press_cnt>=PAIR_HOLD_FRAME_COUNT){
time_5s=PAIRING_WINDOW_TICKS + 1U;
ssse=1;
long_press_cnt=0;
pair_deferred_command=0U;
if(res_data==Brightness_H||res_data==B_Brightness_H||res_data==F_Brightness_10){
adress=receive_data >>8;
adress_H = (receive_data >> 16) & 0xff;
adress_L = (receive_data >> 8) & 0xff;
// 第一步:检查是否已存在
for(j = 0; j <5; j++) {
if(adress_H_array[j] == adress_H && adress_L_array[j] == adress_L) {
isok=1;
break;
}
}
// 如果不存在,找空位添加
if(j==5) { // 循环完整结束,说明不存在
// 寻找空位置(值为0的位置)
for(i = 0; i <=4; i++) {
if(adress_H_array[i] == 0 && adress_L_array[i] == 0) {
adress_H_array[i] = adress_H;
adress_L_array[i] = adress_L;
isok=1;
break;
}
if(i==4){
for(j = 0; j <5; j++) {
if(adress_H_array[j] == adress_H && adress_L_array[j] == adress_L) {
updata=1;
break;
}
}
if(updata==0){
addToFixedArray(adress_H_array,adress_H);
addToFixedArray(adress_L_array,adress_L);
}
}
if(Pairing_Address_AddNew(adress_H, adress_L))
{
pairing_data_changed=1U;
}
else if(match_success==0U)
{
pairing_data_changed=1U;
}
times_s=300;
match_success=1;
/// EA=0;
isok=0;
if(W_PWM==0&&C_PWM==0){
if(Mode==0){
W_PWM=10;
C_PWM=0;
UpdateDisplay();
}else {
W_PWM=10;
C_PWM=0;
UpdateDisplay_1();
}
}
if(deviceStatus==POWEROFF){
startTimer(&timer1,1);
Start_PWM();
}
for (i=0;i<3;i++){
Start_PWM();
Delay_ms(times_s);
Stop_PWM();
Delay_ms(times_s);
}
Start_PWM();
startTimer(&timer1,1);
Pairing_Feedback_Start(times_s);
}
else if(res_data==Brightness_L||res_data==B_Brightness_L||res_data==F_Brightness_100){
pairing_data_changed=1U;
adress_H_array[0] = 0xff;
adress_L_array[0] = 0xff;
adress_H_array[1] = 0xff;
@@ -188,37 +352,33 @@ static void Encoder_key_NoCode(){
times_s=200;
match_success = 0;
if(W_PWM==0&&C_PWM==0){
W_PWM=10;
C_PWM=0;
if(Mode==0){
UpdateDisplay();
}else {
UpdateDisplay_1();
}
}
if(deviceStatus==POWEROFF){
startTimer(&timer1,1);
Start_PWM();
}
for (i=0;i<3;i++){
Start_PWM();
Delay_ms(times_s);
Stop_PWM();
Delay_ms(times_s);
}
Start_PWM();
Pairing_Feedback_Start(times_s);
}
ssse=1;
set_TaskComps_timer(2,2000);
}
if(pairing_data_changed) set_TaskComps_timer(2,2000);
}
}
static void Rf433_Decoder_Frame_Poll(void)
{
Rf433DecoderFrame_t frame;
if(!rf433_decoder_get_frame(&frame)) return;
receive_data = frame.code;
receive_temp = frame.code;
res_data = frame.key;
rf_frame_sequence++;
rf_flag.rf_receive_flag.receive_finish = 1U;
long_time = RF433_RELEASE_TIMEOUT_TICKS;
}
void Encoder_key(){
Rf433_Decoder_Frame_Poll();
Encoder_key_NoCode(); //一对一
Pairing_Feedback_Task();
}
@@ -241,110 +401,59 @@ static void set_click(){
}
}
void rf433_receive(void)//rf433接收,查询周期100us
void rf433_receive(void)//RF433 sample, called every 100 us
{
rf433_decoder_sample((RF_DATA == HIGH_LEVEL) ? 1U : 0U);
if (RF_DATA == LOW_LEVEL)
if(long_time > 0U)
{
low_level_time++;//记录低电平时间
rf_flag.rf_receive_flag.current_level = 0; //当前电平状态
}
else if (RF_DATA == HIGH_LEVEL)
long_time--;
long_flag_s = 0U;
if(KEY_STATE_re == 1U)
{
high_level_time++;//记录高电平时间
if (!rf_flag.rf_receive_flag.current_level)//每个上升沿检测,0→1,一个完整的周期检测
if(time_300ms == 0U)
{
// if ((high_level_time > 1 && high_level_time < 7) && (low_level_time > 115 && low_level_time < 125)) //判同步码,时间间隔12ms
//if ((high_level_time > 4 && high_level_time < 9) && ((low_level_time > 17 && low_level_time < 23))) //判同步码,时间间隔12ms
if ((high_level_time > 1 && high_level_time < 7) && (low_level_time > 115 && low_level_time < 130)) //判同步码,时间间隔12ms
{
//进来这里需要13ms
rf_flag.rf_receive_flag.sync_code = 1;//同步码接收成功标志
receive_data_cnt = 0;
receive_temp = 0;
long_time=frames_time;
}
else if (rf_flag.rf_receive_flag.sync_code)//开始接收数据包
{
//if ((high_level_time > 1 && high_level_time < 9) && (low_level_time > 8 && low_level_time < 18)) //数据低电平
if ((high_level_time >= 1 && high_level_time <= 7) && (low_level_time >= 7 && low_level_time <= 16)) //数据低电平
{
receive_data_cnt++;//接收24位位数
receive_temp = receive_temp << 1;
if (receive_data_cnt == 24)//24位数据接收完成
{
//进来这个if需要40ms
rf_flag.rf_receive_flag.receive_finish = 1;//24位数据接收完成标志
rf_flag.rf_receive_flag.sync_code = 0;
receive_data = receive_temp;//将接收到的编码复制到解码寄存器中
res_data=receive_temp;
}
}
//else if ((high_level_time > 7 && high_level_time < 18) && (low_level_time > 2 && low_level_time < 9)) //数据高电平
else if ((high_level_time >= 7 && high_level_time <= 16) && (low_level_time >= 2 && low_level_time<= 7)) //数据高电平
{
receive_temp = receive_temp << 1;
receive_temp |= 1;
receive_data_cnt++;
if (receive_data_cnt == 24)
{
//进来这个if需要40ms3748f3
rf_flag.rf_receive_flag.receive_finish = 1;//24位数据接收完成标志
rf_flag.rf_receive_flag.sync_code = 0;
receive_data = receive_temp;//将接收到的编码复制到解码寄存器中
res_data=receive_temp;
}
time_300ms = RF433_MS_TO_SAMPLE_TICKS(Short_time);
long_flag_s = 1U;
KEY_STATE_re = 0U;
}
else
{
rf_flag.rf_receive_flag.sync_code = 0;//接收失败
}
long_time=frames_time;//该值一定要大与68,68是指68ms通过逻辑分析仪测量一帧的时间
//
//
}
if(long_time>0){ //一直按着会进入该if
//P05=0; //433LED灯
long_time--;
long_flag_s=0;
if( KEY_STATE_re==1){
if(time_300ms==0){
time_300ms=Short_time;
long_flag_s=1;
KEY_STATE_re=0;
}
else if(time_300ms>0) time_300ms--;
time_300ms--;
}
}
else { //松手
time_300ms=LongPress_time;
long_time=0;
long_flag_s=0;
Key_TypeDef.KEY_STATE_Click=0;
KEY_STATE_re=0;
}
else
{
time_300ms = RF433_MS_TO_SAMPLE_TICKS(LongPress_time);
long_flag_s = 0U;
Key_TypeDef.KEY_STATE_Click = 0U;
KEY_STATE_re = 0U;
}
low_level_time = 0;//清零低电平时间
high_level_time = 1;//高电平时间开始计数
}
rf_flag.rf_receive_flag.current_level = 1;//当前电平状态
}
//
if(time_5s<=40000){
if(time_5s <= PAIRING_WINDOW_TICKS)
{
time_5s++;
}
}
uint16_t spee_dealy_time=0; //速度缓慢变换
#define REMOTE_MODE_MIN 0U
#define REMOTE_MODE_MAX EFFECT_MODE_MAX
void _433_fun(){
if(Light_Transition_FeedbackActive()) return;
if(!pair_command_replay && ssse == 0U &&
time_5s <= PAIRING_WINDOW_TICKS &&
Pairing_IsTriggerCommand(res_data))
{
pair_deferred_command = 1U;
pair_deferred_res_data = res_data;
pair_deferred_receive_data = receive_data;
return;
}
if(Key_TypeDef.KEY_STATE_Click==1||KEY_STATE_re==1) return;
set_click();
sss=1;//记忆标志位
switch(res_data){
//椭圆
case ON://单击
@@ -359,36 +468,58 @@ void _433_fun(){
break;
case Mode_add:
if(POWEROFF==deviceStatus)break;
if(choose_mode_falsg!=0){ //遥控只是切换暖光,不跳模式
choose_mode_bh=0;
choose_mode_falsg=0;
startTimer(&timer1,1);
if(choose_mode_falsg>REMOTE_MODE_MAX){
choose_mode_falsg=REMOTE_MODE_MIN;
}else if(choose_mode_falsg<REMOTE_MODE_MAX){
choose_mode_falsg++;
}else{
break;
}
choose_mode_bh=0;
startTimer(&timer1,1);
break;
case Mode_dow:
if(POWEROFF==deviceStatus)break;
if(choose_mode_falsg!=1){ //遥控只是切换冷光,不跳模式
choose_mode_bh=0;
choose_mode_falsg=1;
startTimer(&timer1,1);
if(choose_mode_falsg>REMOTE_MODE_MAX){
choose_mode_falsg=REMOTE_MODE_MIN;
}else if(choose_mode_falsg>REMOTE_MODE_MIN){
choose_mode_falsg--;
}else{
break;
}
choose_mode_bh=0;
startTimer(&timer1,1);
break;
case Brightness_L:
if(POWEROFF==deviceStatus)break;
if(Mode==mode0){
Brightness--;
if(Brightness<=2){Brightness=2;}
if(Brightness <=
(BRIGHTNESS_MIN_PERCENT + BRIGHTNESS_RF_STEP_PERCENT))
{
Brightness = BRIGHTNESS_MIN_PERCENT;
}
else
{
Brightness -= BRIGHTNESS_RF_STEP_PERCENT;
}
}else {
if(Speed<10)Speed++;
if(Speed<SPEED_MAX_LEVEL)Speed++;
}
break;
case Brightness_H:
if(POWEROFF==deviceStatus)break;
if(Mode==mode0){
Brightness++;
if(Brightness>=10){Brightness=10;}
if(Brightness >=
(BRIGHTNESS_MAX_PERCENT - BRIGHTNESS_RF_STEP_PERCENT))
{
Brightness = BRIGHTNESS_MAX_PERCENT;
}
else
{
Brightness += BRIGHTNESS_RF_STEP_PERCENT;
}
}else{
if(Speed>1)Speed--;
if(Speed>SPEED_MIN_LEVEL)Speed--;
}
break;
default:
@@ -396,13 +527,14 @@ void _433_fun(){
if(res_data>=16&&res_data<=255){
Mode=mode0;
choose_mode_bh=0;
choose_mode_falsg=10;//圆环模式
choose_mode_falsg=CUSTOM_TEMPERATURE_MODE;//圆环模式
driveMode=0;
temperature(res_data);
temperature((uint8_t)(((uint16_t)(255U - res_data) * 255U + 119U) / 239U));
startTimer(&timer1,1);
}
break;
}
set_TaskComps_timer(2U, 1000U);
}
@@ -15,6 +15,8 @@
#include "app_sec.h"
#include "app_task.h" // Application Manager Task API
extern void ble_state_disconnect(void);
#if APP_SCAN_FUNCTION
extern void set_channel_scan(uint8_t channel);
@@ -703,6 +705,7 @@ static uint8_t gapc_callback(ke_msg_id_t const msgid, void const *param, ke_task
printf("app_start_advertising\n");
app_env.slave_conidx = INVALID_DATA;
app_env.slave_connected = false;
ble_state_disconnect();
app_start_advertising();
}
@@ -56,6 +56,7 @@
#include "pwm.h"
#include "mode.h"
#include "RF433.h"
#include "rf433_decoder.h"
#include "rgblight.h"
#include "timer.h"
#include "fmc_spi.h"
@@ -238,7 +239,6 @@ void board_init()
{
clock_init();
// app_uart_init();
rf433_gpio_init();
#if (_DEBUG_ == 1)
app_uart_init();
#endif
@@ -396,10 +396,12 @@ int main(void)
xc_fmc_spi_flash_wake_up();
fmc_spi_read();
power_restore_apply_on_boot();
timer0_2_init();
bluetooth_init();
_PWM_INIT();
Bridge_Init();
// app_pwm_init();
@@ -448,6 +450,8 @@ int main(void)
#endif
// gpio_pullup_input_inter_test();
adc_Init();
rf433_decoder_init();
rf433_gpio_init();
while (1){
//DEBUG("222\r\n");
//printf("ddd=%d---%d---%d\r\n",W_PWM_duty,C_PWM_duty,(2*deadTime));
@@ -0,0 +1,614 @@
#include "pwm.h"
#include "mode.h"
#include "xc_drv_gpio.h"
#include "xc_drv_pwm.h"
#include "xc_drv_timer.h"
#include "light_transition.h"
/*
* External H-bridge input states:
* W: GPIO_1 high/PWM, GPIO_2 low
* C: GPIO_1 low, GPIO_2 high/PWM
* OFF: both low
*
* Single-color output uses a fixed 2 kHz hardware PWM.
*
* 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.
* 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.
*/
#define BRIDGE_PWM_SCALE 1000U
#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_MIN_DUAL_PULSE_US 1U
#define BRIDGE_NEUTRAL_PDM_PULSE_US 50U
#define BRIDGE_TIMER_TICKS_PER_US 16U
#define BRIDGE_PDM_THRESHOLD (BRIDGE_MIX_SCALE * 4096UL)
#define BRIDGE_NEUTRAL_PDM_THRESHOLD \
(BRIDGE_NEUTRAL_PDM_PULSE_US * BRIDGE_PDM_THRESHOLD)
#define BRIDGE_GPIO_PORT 0U
#define BRIDGE_GPIO_MASK ((1UL << IO_PWM_W) | (1UL << IO_PWM_C))
#define BRIDGE_TIMER3_TLC_REG (*(volatile uint32_t *)0x4000303CUL)
#define BRIDGE_TIMER3_TCR_REG (*(volatile uint32_t *)0x40003044UL)
#define BRIDGE_OFF 0U
#define BRIDGE_W 1U
#define BRIDGE_C 2U
#define BRIDGE_MODE_OFF 0U
#define BRIDGE_MODE_SINGLE 1U
#define BRIDGE_MODE_DUAL 2U
#define BRIDGE_STAGE_IDLE 0U
#define BRIDGE_STAGE_START_SINGLE 1U
#define BRIDGE_STAGE_START_W 2U
#define BRIDGE_STAGE_END_W 3U
#define BRIDGE_STAGE_START_C 4U
#define BRIDGE_STAGE_END_C 5U
#define BRIDGE_FLASH_BLANK_IDLE 0U
#define BRIDGE_FLASH_BLANK_REQUEST 1U
#define BRIDGE_FLASH_BLANK_READY 2U
static volatile uint8_t active_state;
static volatile uint8_t output_mode;
static volatile uint8_t timer_stage;
static volatile uint8_t flash_blank_state;
static volatile uint8_t pending_single_state;
static volatile uint16_t pending_single_duty;
static volatile uint16_t frame_w_us;
static volatile uint16_t frame_c_us;
static volatile uint16_t frame_wc_off_us;
static volatile uint16_t frame_cw_off_us;
static volatile uint16_t next_w_us;
static volatile uint16_t next_c_us;
static volatile uint16_t next_wc_off_us;
static volatile uint16_t next_cw_off_us;
static volatile uint32_t next_pdm_w_step;
static volatile uint32_t next_pdm_c_step;
static volatile uint32_t next_pdm_threshold;
static volatile uint8_t next_pdm_enabled;
static volatile uint32_t pdm_w_accumulator;
static volatile uint32_t pdm_c_accumulator;
static volatile uint32_t frame_pdm_threshold;
static volatile uint8_t frame_pdm_enabled;
static volatile uint8_t frame_w_emit;
static volatile uint8_t frame_c_emit;
static uint16_t cached_w_mix = 0xFFFFU;
static uint16_t cached_c_mix = 0xFFFFU;
static uint8_t bridge_ready;
__RAM_CODE static uint16_t clamp_mix_value(uint32_t value)
{
return (value > BRIDGE_MIX_SCALE) ? BRIDGE_MIX_SCALE : (uint16_t)value;
}
static uint8_t pwm_index_for_state(uint8_t state)
{
return (state == BRIDGE_W) ? PWM0_IDX : PWM1_IDX;
}
static void bridge_pin_low(uint8_t pin)
{
xc_gpio_mux_ctl(pin, GPIO_Mux0);
xc_gpio_fun_sel(pin, GPIO_Dx);
xc_gpio_direction_config(pin, GPIO_DIR_OUTPUT);
xc_gpio_write_pin(pin, GPIO_PIN_RESET);
}
__RAM_CODE static void bridge_gpio_write(uint8_t state)
{
uint32_t output = 0U;
if (state == BRIDGE_W) {
output = (1UL << IO_PWM_W);
} else if (state == BRIDGE_C) {
output = (1UL << IO_PWM_C);
} else {
state = BRIDGE_OFF;
}
/*
* GPIO_1 and GPIO_2 share port 0. Write-enable bits update both pins
* atomically, so an intermediate 11 state cannot be generated.
*/
gpio_port_dr_set(BRIDGE_GPIO_PORT,
(BRIDGE_GPIO_MASK << DR_WE_LSB) | output);
active_state = state;
}
__RAM_CODE static void bridge_gpio_off(void)
{
bridge_gpio_write(BRIDGE_OFF);
}
static void bridge_force_off(void)
{
xc_pwm_stop(PWM0_IDX);
xc_pwm_stop(PWM1_IDX);
bridge_pin_low(IO_PWM_W);
bridge_pin_low(IO_PWM_C);
bridge_gpio_off();
}
__RAM_CODE static void bridge_gpio_state(uint8_t state)
{
bridge_gpio_write(state);
}
__RAM_CODE static void bridge_timer_stop_fast(void)
{
BRIDGE_TIMER3_TCR_REG = 0U;
}
__RAM_CODE static void bridge_timer_start(uint16_t duration_us)
{
uint32_t ticks;
if (duration_us == 0U) {
duration_us = 1U;
}
ticks = (uint32_t)duration_us * BRIDGE_TIMER_TICKS_PER_US;
bridge_timer_stop_fast();
BRIDGE_TIMER3_TLC_REG = ticks;
BRIDGE_TIMER3_TCR_REG = 1U;
}
static void bridge_start_pwm(uint8_t state, uint16_t duty)
{
uint8_t pwm_idx;
uint8_t pin;
GPIO_FUN_SEL_TypeDef function;
if (state != BRIDGE_W && state != BRIDGE_C) {
Bridge_Off();
return;
}
pwm_idx = pwm_index_for_state(state);
pin = (state == BRIDGE_W) ? IO_PWM_W : IO_PWM_C;
function = (state == BRIDGE_W) ? PWM0 : PWM1;
bridge_force_off();
xc_pwm_dutycycle_set(pwm_idx, BRIDGE_PWM_SCALE, duty);
xc_gpio_mux_ctl(pin, GPIO_Mux0);
xc_gpio_fun_sel(pin, function);
xc_pwm_start(pwm_idx);
active_state = state;
output_mode = BRIDGE_MODE_SINGLE;
}
void Bridge_Init(void)
{
PWM_InitCfg_t pwm_cfg;
Timer_InitCfg_t timer_cfg;
pwm_cfg.SrcClk = PWM_CLK_SRC_32M_DIV;
pwm_cfg.DivClk = PWM_CLK_DIV0;
pwm_cfg.DutyCycleAcc = BRIDGE_PWM_SCALE;
pwm_cfg.DutyCycle = 0U;
pwm_cfg.SrcEnable = PWM_EN_SEL_SELF;
pwm_cfg.Period = BRIDGE_PWM_PERIOD;
pwm_cfg.InvertDelay = 0U;
pwm_cfg.InvertEnable = false;
pwm_cfg.OutputPin = IO_PWM_W;
pwm_cfg.OutputInvertPin = IO_PWM_C;
xc_pwm_init(PWM0_IDX, &pwm_cfg);
pwm_cfg.OutputPin = IO_PWM_C;
pwm_cfg.OutputInvertPin = IO_PWM_W;
xc_pwm_init(PWM1_IDX, &pwm_cfg);
timer_cfg.timer_src_clk = TIMER_CLK_SRC_32M_DIV;
timer_cfg.timer_div_clk = TIMER_DIV_CLK_16MHzOr16K;
timer_cfg.timer_mode = TIMER_MODE_SINGLE;
xc_timer_init(TIMER3_IDX, &timer_cfg);
NVIC_SetPriority((IRQn_Type)TIMER3_IRQn, 0);
NVIC_EnableIRQ(TIMER3_IRQn);
flash_blank_state = BRIDGE_FLASH_BLANK_IDLE;
bridge_ready = 1U;
Bridge_Off();
}
void Bridge_Off(void)
{
xc_timer_stop(TIMER3_IDX);
timer_stage = BRIDGE_STAGE_IDLE;
pending_single_state = BRIDGE_OFF;
pending_single_duty = 0U;
frame_w_us = 0U;
frame_c_us = 0U;
frame_wc_off_us = 0U;
frame_cw_off_us = 0U;
next_w_us = 0U;
next_c_us = 0U;
next_wc_off_us = 0U;
next_cw_off_us = 0U;
next_pdm_w_step = 0U;
next_pdm_c_step = 0U;
next_pdm_threshold = 0U;
next_pdm_enabled = 0U;
pdm_w_accumulator = 0U;
pdm_c_accumulator = 0U;
frame_pdm_threshold = 0U;
frame_pdm_enabled = 0U;
frame_w_emit = 0U;
frame_c_emit = 0U;
cached_w_mix = 0xFFFFU;
cached_c_mix = 0xFFFFU;
bridge_force_off();
output_mode = BRIDGE_MODE_OFF;
if (flash_blank_state == BRIDGE_FLASH_BLANK_REQUEST)
flash_blank_state = BRIDGE_FLASH_BLANK_READY;
}
void Bridge_FlashBlank_Request(void)
{
if (!bridge_ready ||
flash_blank_state != BRIDGE_FLASH_BLANK_IDLE)
return;
if (output_mode == BRIDGE_MODE_DUAL &&
timer_stage != BRIDGE_STAGE_IDLE) {
flash_blank_state = BRIDGE_FLASH_BLANK_REQUEST;
return;
}
flash_blank_state = BRIDGE_FLASH_BLANK_READY;
}
uint8_t Bridge_FlashBlank_Ready(void)
{
return (flash_blank_state == BRIDGE_FLASH_BLANK_READY) ? 1U : 0U;
}
void Bridge_FlashBlank_Resume(void)
{
if (flash_blank_state != BRIDGE_FLASH_BLANK_READY)
return;
flash_blank_state = BRIDGE_FLASH_BLANK_IDLE;
}
/*
* Flash page-program keeps global interrupts disabled. Poll Timer3 from the
* RAM-resident Flash busy loop so the software H-bridge frame continues.
*/
__RAM_CODE void xc_fmc_spi_flash_busy_hook(void)
{
if (!bridge_ready ||
(deviceStatus == POWEROFF && !Light_Transition_FadeActive) ||
output_mode != BRIDGE_MODE_DUAL ||
timer_stage < BRIDGE_STAGE_START_W ||
timer_stage > BRIDGE_STAGE_END_C)
return;
if (timer_tis_get(TIMER3_IDX) != 0U) {
NVIC_ClearPendingIRQ((IRQn_Type)TIMER3_IRQn);
(void)timer_tic_get(TIMER3_IDX);
Bridge_Deadtime_Expired();
}
}
__RAM_CODE void Bridge_Deadtime_Expired(void)
{
uint32_t w_step;
uint32_t c_step;
uint32_t pdm_threshold;
uint8_t pdm_enabled;
if (!bridge_ready ||
(deviceStatus == POWEROFF && !Light_Transition_FadeActive)) {
Bridge_Off();
return;
}
if (timer_stage == BRIDGE_STAGE_START_W) {
if (flash_blank_state == BRIDGE_FLASH_BLANK_REQUEST) {
flash_blank_state = BRIDGE_FLASH_BLANK_READY;
}
/*
* Latch all four durations together at the W boundary. A brightness
* update can then never mix old and new timings inside one frame.
*/
frame_w_us = next_w_us;
frame_c_us = next_c_us;
frame_wc_off_us = next_wc_off_us;
frame_cw_off_us = next_cw_off_us;
pdm_enabled = next_pdm_enabled;
w_step = next_pdm_w_step;
c_step = next_pdm_c_step;
pdm_threshold = next_pdm_threshold;
if (pdm_enabled &&
(!frame_pdm_enabled ||
frame_pdm_threshold != pdm_threshold)) {
pdm_w_accumulator = pdm_threshold - w_step;
/*
* A 50:50 neutral target gives W and C identical PDM steps.
* Start C half a density cycle away from W so their optical
* pulses are spread across different frames instead of arriving
* as one bright pair followed by a long dark gap.
*/
if (pdm_threshold == BRIDGE_NEUTRAL_PDM_THRESHOLD)
pdm_c_accumulator = pdm_threshold / 2U;
else
pdm_c_accumulator = pdm_threshold - c_step;
}
frame_pdm_enabled = pdm_enabled;
frame_pdm_threshold = pdm_enabled ? pdm_threshold : 0U;
if (frame_pdm_enabled) {
pdm_w_accumulator += w_step;
if (pdm_w_accumulator >= frame_pdm_threshold) {
pdm_w_accumulator -= frame_pdm_threshold;
frame_w_emit = 1U;
} else {
frame_w_emit = 0U;
}
pdm_c_accumulator += c_step;
if (pdm_c_accumulator >= frame_pdm_threshold) {
pdm_c_accumulator -= frame_pdm_threshold;
frame_c_emit = 1U;
} else {
frame_c_emit = 0U;
}
} else {
pdm_w_accumulator = 0U;
pdm_c_accumulator = 0U;
frame_w_emit = 1U;
frame_c_emit = 1U;
}
if (frame_w_emit)
bridge_gpio_state(BRIDGE_W);
else
bridge_gpio_off();
timer_stage = BRIDGE_STAGE_END_W;
bridge_timer_start(frame_w_us);
} else if (timer_stage == BRIDGE_STAGE_END_W) {
bridge_gpio_off();
timer_stage = BRIDGE_STAGE_START_C;
bridge_timer_start(frame_wc_off_us);
} else if (timer_stage == BRIDGE_STAGE_START_C) {
if (frame_c_emit)
bridge_gpio_state(BRIDGE_C);
else
bridge_gpio_off();
timer_stage = BRIDGE_STAGE_END_C;
bridge_timer_start(frame_c_us);
} else if (timer_stage == BRIDGE_STAGE_END_C) {
bridge_gpio_off();
timer_stage = BRIDGE_STAGE_START_W;
bridge_timer_start(frame_cw_off_us);
} else if (timer_stage == BRIDGE_STAGE_START_SINGLE) {
timer_stage = BRIDGE_STAGE_IDLE;
bridge_start_pwm(pending_single_state, pending_single_duty);
} else {
Bridge_Off();
}
}
__RAM_CODE void Bridge_Service_1ms(void)
{
uint32_t w_mix;
uint32_t c_mix;
uint32_t total;
uint32_t total_on_us;
uint32_t total_off_us;
uint32_t pdm_w_step;
uint32_t pdm_c_step;
uint16_t pwm_duty;
uint8_t single_state;
if (flash_blank_state != BRIDGE_FLASH_BLANK_IDLE)
return;
if (!bridge_ready ||
(deviceStatus == POWEROFF && !Light_Transition_FadeActive)) {
if (output_mode != BRIDGE_MODE_OFF || timer_stage != BRIDGE_STAGE_IDLE) {
Bridge_Off();
}
return;
}
w_mix = clamp_mix_value(W_PWM_duty);
c_mix = clamp_mix_value(C_PWM_duty);
total = w_mix + c_mix;
/*
* Below a physical 1 us pulse, keep the pulse width valid and distribute
* 1 us pulses across 2 kHz frames. This extends a mixed-light power-off
* fade below the normal timer resolution without creating sub-us edges.
*/
pdm_w_step =
BRIDGE_DUAL_ACTIVE_US * Light_Transition_W_Output_Q12;
pdm_c_step =
BRIDGE_DUAL_ACTIVE_US * Light_Transition_C_Output_Q12;
if (deviceStatus == POWEROFF && Light_Transition_FadeActive &&
pdm_w_step != 0U && pdm_c_step != 0U &&
pdm_w_step < BRIDGE_PDM_THRESHOLD &&
pdm_c_step < BRIDGE_PDM_THRESHOLD) {
next_w_us = BRIDGE_MIN_DUAL_PULSE_US;
next_c_us = BRIDGE_MIN_DUAL_PULSE_US;
total_off_us =
BRIDGE_FRAME_US - (2U * BRIDGE_MIN_DUAL_PULSE_US);
next_wc_off_us = (uint16_t)(total_off_us / 2U);
next_cw_off_us =
(uint16_t)(total_off_us - next_wc_off_us);
next_pdm_w_step = pdm_w_step;
next_pdm_c_step = pdm_c_step;
next_pdm_threshold = BRIDGE_PDM_THRESHOLD;
next_pdm_enabled = 1U;
cached_w_mix = (uint16_t)w_mix;
cached_c_mix = (uint16_t)c_mix;
goto dual_output_ready;
}
/*
* In the neutral part of three-color breathing, keep each W/C pulse at
* a reliable 50 us and reduce only its frame density below that level.
* Single-color breathing never enters this branch and stays on hardware
* PWM all the way down to zero.
*/
if (deviceStatus != POWEROFF &&
Mode == mode1 &&
(choose_mode_falsg == 5U || choose_mode_falsg == 6U) &&
w_mix != 0U && c_mix != 0U) {
pdm_w_step =
BRIDGE_DUAL_ACTIVE_US * ((uint32_t)w_mix << 12);
pdm_c_step =
BRIDGE_DUAL_ACTIVE_US * ((uint32_t)c_mix << 12);
if (pdm_w_step < BRIDGE_NEUTRAL_PDM_THRESHOLD &&
pdm_c_step < BRIDGE_NEUTRAL_PDM_THRESHOLD) {
next_w_us = BRIDGE_NEUTRAL_PDM_PULSE_US;
next_c_us = BRIDGE_NEUTRAL_PDM_PULSE_US;
total_off_us =
BRIDGE_FRAME_US -
(2U * BRIDGE_NEUTRAL_PDM_PULSE_US);
next_wc_off_us = (uint16_t)(total_off_us / 2U);
next_cw_off_us =
(uint16_t)(total_off_us - next_wc_off_us);
next_pdm_w_step = pdm_w_step;
next_pdm_c_step = pdm_c_step;
next_pdm_threshold = BRIDGE_NEUTRAL_PDM_THRESHOLD;
next_pdm_enabled = 1U;
cached_w_mix = (uint16_t)w_mix;
cached_c_mix = (uint16_t)c_mix;
goto dual_output_ready;
}
}
if (next_pdm_enabled) {
cached_w_mix = 0xFFFFU;
cached_c_mix = 0xFFFFU;
}
next_pdm_enabled = 0U;
next_pdm_w_step = 0U;
next_pdm_c_step = 0U;
next_pdm_threshold = 0U;
if (total == 0U) {
Bridge_Off();
return;
}
if (total > BRIDGE_MIX_SCALE) {
w_mix = (w_mix * BRIDGE_MIX_SCALE) / total;
c_mix = BRIDGE_MIX_SCALE - w_mix;
total = BRIDGE_MIX_SCALE;
}
/* Keep the verified fixed 2 kHz hardware PWM for a single color. */
if (w_mix == 0U || c_mix == 0U) {
single_state = (w_mix != 0U) ? BRIDGE_W : BRIDGE_C;
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.
*/
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 &&
timer_stage == BRIDGE_STAGE_IDLE) {
xc_pwm_dutycycle_set(pwm_index_for_state(single_state),
BRIDGE_PWM_SCALE, pwm_duty);
return;
}
xc_timer_stop(TIMER3_IDX);
timer_stage = BRIDGE_STAGE_START_SINGLE;
pending_single_state = single_state;
pending_single_duty = pwm_duty;
bridge_force_off();
output_mode = BRIDGE_MODE_OFF;
bridge_timer_start(BRIDGE_DEADTIME_US);
return;
}
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.
*/
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;
}
next_w_us = (uint16_t)((total_on_us * w_mix +
(total / 2U)) / total);
if (next_w_us < BRIDGE_MIN_DUAL_PULSE_US) {
next_w_us = BRIDGE_MIN_DUAL_PULSE_US;
} else if (next_w_us >
total_on_us - BRIDGE_MIN_DUAL_PULSE_US) {
next_w_us =
(uint16_t)(total_on_us - BRIDGE_MIN_DUAL_PULSE_US);
}
next_c_us = (uint16_t)(total_on_us - next_w_us);
total_off_us = BRIDGE_FRAME_US - total_on_us;
next_wc_off_us = (uint16_t)(total_off_us / 2U);
next_cw_off_us = (uint16_t)(total_off_us - next_wc_off_us);
cached_w_mix = (uint16_t)w_mix;
cached_c_mix = (uint16_t)c_mix;
}
dual_output_ready:
if (output_mode == BRIDGE_MODE_DUAL &&
timer_stage != BRIDGE_STAGE_IDLE) {
return;
}
/*
* Timer3 owns the complete repeating frame, including both full direction
* deadtimes. Timer0 only publishes updated brightness/mix parameters.
*/
bridge_timer_stop_fast();
timer_stage = BRIDGE_STAGE_START_W;
bridge_force_off();
output_mode = BRIDGE_MODE_DUAL;
bridge_timer_start(next_cw_off_us);
}
@@ -33,6 +33,7 @@
#include "PWM.h"
#include "RF433.h"
#include "xc60xx.h"
#include "timeslice.h"
/*------------------------------------------------------------------------------------
Macros
@@ -69,6 +70,20 @@ unsigned char get_checksum(unsigned char *ptrdata, unsigned char length)
return CheckSum;
}
#define FLASH_BRIGHTNESS_FORMAT_INDEX 14U
#define FLASH_BRIGHTNESS_PERCENT_MARK 0xA5U
#define FLASH_MODE_LAYOUT_INDEX 26U
#define FLASH_MODE_LAYOUT_MARK 0xA6U
#define FLASH_POWER_MODE_MARK_INDEX 27U
#define FLASH_POWER_MODE_INDEX 28U
#define FLASH_POWER_CYCLE_INDEX 29U
#define FLASH_POWER_MODE_MARK 0xA7U
#define POWER_POLICY_SAVE_DELAY_MS 100U
#define USER_DATA_FLASH_ADDR 0x1E000UL
uint8_t power_restore_policy = POWER_RESTORE_CYCLE_STATIC;
static uint8_t power_cycle_next_mode;
void read_user_data(void)
{
@@ -78,12 +93,40 @@ void read_user_data(void)
Mode = r_data[2];
Brightness = r_data[3];
/*
* Firmware before the percent-brightness update stored 2..10.
* Byte 14 was unused, so use it as an explicit format marker.
*/
if(r_data[FLASH_BRIGHTNESS_FORMAT_INDEX] !=
FLASH_BRIGHTNESS_PERCENT_MARK)
{
if(Brightness >= 2U && Brightness <= 10U)
Brightness = (uint8_t)(Brightness * 10U);
else
Brightness = BRIGHTNESS_MAX_PERCENT;
}
if(Brightness < BRIGHTNESS_MIN_PERCENT)
Brightness = BRIGHTNESS_MIN_PERCENT;
else if(Brightness > BRIGHTNESS_MAX_PERCENT)
Brightness = BRIGHTNESS_MAX_PERCENT;
Speed = r_data[7];
if(Speed > SPEED_MAX_LEVEL)
Speed = SPEED_MAX_LEVEL;
deviceStatus = r_data[8];
W_PWM = r_data[9];
C_PWM = r_data[10];
/* Migrate the old 0..10 color mix to the new 0..100 scale. */
if(Mode == mode0 && W_PWM <= 10U && C_PWM <= 10U && (W_PWM + C_PWM) > 0U)
{
uint16_t legacy_mix = W_PWM + C_PWM;
W_PWM = (uint16_t)(((uint32_t)W_PWM * 100U + legacy_mix / 2U) / legacy_mix);
C_PWM = 100U - W_PWM;
}
is_time = r_data[12];
// flag_1h = r_data[13];//
// adress = r_data[14];
@@ -100,6 +143,28 @@ void read_user_data(void)
adress_H_array[4]=r_data[24];
adress_L_array[4]=r_data[25];
choose_mode_falsg=r_data[30];
/* Preserve old mode meanings after inserting new mode 9. */
if(r_data[FLASH_MODE_LAYOUT_INDEX] != FLASH_MODE_LAYOUT_MARK &&
choose_mode_falsg >= 8U && choose_mode_falsg <= 13U)
{
choose_mode_falsg++;
}
if(choose_mode_falsg > CUSTOM_TEMPERATURE_MODE)
choose_mode_falsg = EFFECT_MODE_MIN;
if(r_data[FLASH_POWER_MODE_MARK_INDEX] == FLASH_POWER_MODE_MARK)
{
power_restore_policy = r_data[FLASH_POWER_MODE_INDEX];
if(power_restore_policy > POWER_RESTORE_CYCLE_STATIC)
power_restore_policy = POWER_RESTORE_CYCLE_STATIC;
power_cycle_next_mode = r_data[FLASH_POWER_CYCLE_INDEX];
if(power_cycle_next_mode > 2U)
power_cycle_next_mode = 0U;
}
else
{
power_restore_policy = POWER_RESTORE_CYCLE_STATIC;
power_cycle_next_mode = 0U;
}
//choose_mode_bh=r_data[31];
driveMode=r_data[32];
flag_1h = (r_data[36] << 24) | (r_data[35] << 16) | (r_data[34] << 8) | r_data[33];
@@ -130,6 +195,7 @@ void wright_user_data(void)
app_data[11] = 0;
app_data[12] = is_time;
app_data[13] = 0;
app_data[FLASH_BRIGHTNESS_FORMAT_INDEX] = FLASH_BRIGHTNESS_PERCENT_MARK;
app_data[15] = match_success;
@@ -144,10 +210,10 @@ void wright_user_data(void)
app_data[23]=adress_L_array[3];
app_data[24]=adress_H_array[4];
app_data[25]=adress_L_array[4];
app_data[26]=0;
app_data[27]=0;
app_data[28]=0;
app_data[29]=0;
app_data[FLASH_MODE_LAYOUT_INDEX]=FLASH_MODE_LAYOUT_MARK;
app_data[FLASH_POWER_MODE_MARK_INDEX]=FLASH_POWER_MODE_MARK;
app_data[FLASH_POWER_MODE_INDEX]=power_restore_policy;
app_data[FLASH_POWER_CYCLE_INDEX]=power_cycle_next_mode;
app_data[30]=choose_mode_falsg;
app_data[31]=choose_mode_bh;
app_data[32]=driveMode;
@@ -173,5 +239,64 @@ void fmc_spi_read(void)
}
void power_restore_policy_set(uint8_t policy)
{
if(policy > POWER_RESTORE_CYCLE_STATIC) return;
if(policy == POWER_RESTORE_CYCLE_STATIC &&
power_restore_policy != POWER_RESTORE_CYCLE_STATIC)
power_cycle_next_mode = 0U;
if(policy == power_restore_policy) return;
power_restore_policy = policy;
set_TaskComps_timer(2U, POWER_POLICY_SAVE_DELAY_MS);
}
void power_restore_apply_on_boot(void)
{
uint8_t mode_index;
if(power_restore_policy != POWER_RESTORE_CYCLE_STATIC) return;
mode_index = power_cycle_next_mode;
if(mode_index > 2U) mode_index = 0U;
deviceStatus = POWERON;
Mode = mode0;
choose_mode_falsg = mode_index;
choose_mode_bh = 0U;
if(mode_index == 0U)
{
W_PWM = 100U;
C_PWM = 0U;
driveMode = 1U;
}
else if(mode_index == 1U)
{
W_PWM = 0U;
C_PWM = 100U;
driveMode = 2U;
}
else
{
W_PWM = 50U;
C_PWM = 50U;
driveMode = 0U;
}
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.
*/
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();
}
@@ -37,6 +37,9 @@ extern "C" {
#include <string.h>
#include <stdint.h>
#define POWER_RESTORE_FULL_MEMORY 0U
#define POWER_RESTORE_CYCLE_STATIC 1U
/*------------------------------------------------------------------------------------
Macros
-------------------------------------------------------------------------------------*/
@@ -49,12 +52,15 @@ extern "C" {
Global Variables
-------------------------------------------------------------------------------------*/
extern uint8_t data[];
extern uint8_t power_restore_policy;
/*------------------------------------------------------------------------------------
Exported Functions
-------------------------------------------------------------------------------------*/
void fmc_spi_wright(void);
void fmc_spi_dma_demo(void);
void fmc_spi_read(void);
void power_restore_apply_on_boot(void);
void power_restore_policy_set(uint8_t policy);
#ifdef __cplusplus
}
#endif
@@ -0,0 +1,458 @@
#include "pwm.h"
#include "mode.h"
#include "light_transition.h"
volatile uint8_t Light_Transition_FadeActive;
volatile uint8_t Light_Transition_ModeActive;
volatile uint32_t Light_Transition_W_Output_Q12;
volatile uint32_t Light_Transition_C_Output_Q12;
#define BRIGHTNESS_SMOOTH_SHIFT 4U
#define OUTPUT_SMOOTH_SHIFT 4U
#define MODE_TRANSITION_TICKS 40U
#define LIGHT_OUTPUT_SCALE 1000U
#define BREATH_MIN_OUTPUT (LIGHT_OUTPUT_SCALE / 100U)
#define DUAL_MIN_STABLE_CHANNEL_OUTPUT 102U
#define POWER_FADE_Q12_MAX 4096U
#define POWER_FADE_ON_TICKS 140U
#define POWER_FADE_OFF_TICKS 160U
#define POWER_FADE_ON_STEP (POWER_FADE_Q12_MAX / POWER_FADE_ON_TICKS)
#define POWER_FADE_ON_REMAINDER (POWER_FADE_Q12_MAX % POWER_FADE_ON_TICKS)
#define POWER_FADE_OFF_STEP (POWER_FADE_Q12_MAX / POWER_FADE_OFF_TICKS)
#define POWER_FADE_OFF_REMAINDER (POWER_FADE_Q12_MAX % POWER_FADE_OFF_TICKS)
/*
* Gamma 1.8, mapping APP levels 1..100 to a physical range of 1%..100%.
* Values are Q12 scale factors, so the runtime path is only:
* table lookup + multiply + shift.
*/
static const uint16_t brightness_gamma_q12[100] = {
41U, 42U, 45U, 48U, 54U, 60U, 67U, 75U, 85U, 95U,
106U, 119U, 132U, 146U, 161U, 177U, 193U, 211U, 229U, 249U,
269U, 290U, 311U, 334U, 357U, 381U, 406U, 432U, 459U, 486U,
514U, 542U, 572U, 602U, 633U, 665U, 697U, 731U, 764U, 799U,
834U, 871U, 907U, 945U, 983U, 1022U, 1061U, 1102U, 1143U, 1184U,
1227U, 1270U, 1313U, 1358U, 1403U, 1449U, 1495U, 1542U, 1590U, 1638U,
1687U, 1737U, 1787U, 1838U, 1890U, 1942U, 1995U, 2049U, 2103U, 2158U,
2214U, 2270U, 2327U, 2384U, 2442U, 2501U, 2560U, 2620U, 2681U, 2742U,
2804U, 2867U, 2930U, 2993U, 3058U, 3123U, 3188U, 3255U, 3321U, 3389U,
3457U, 3525U, 3595U, 3664U, 3735U, 3806U, 3878U, 3950U, 4023U, 4096U
};
/*
* Mixed-light Gamma table. Its first level equals the original level 41
* (834/4096), where a 50:50 mix measures about 46 us per direction at 2 kHz.
* The remaining range is expanded to 100%, so all brightness levels remain
* distinct instead of clamping the lower levels to one fixed output.
*/
static const uint16_t mixed_brightness_gamma_q12[100] = {
834U, 835U, 837U, 840U, 844U, 849U, 855U, 861U, 869U, 877U,
886U, 897U, 907U, 918U, 931U, 943U, 956U, 971U, 985U, 1001U,
1017U, 1034U, 1051U, 1070U, 1088U, 1108U, 1128U, 1149U, 1170U, 1192U,
1214U, 1237U, 1261U, 1285U, 1310U, 1336U, 1362U, 1389U, 1416U, 1444U,
1472U, 1502U, 1531U, 1561U, 1592U, 1623U, 1655U, 1688U, 1720U, 1753U,
1788U, 1823U, 1857U, 1893U, 1930U, 1967U, 2004U, 2041U, 2080U, 2119U,
2158U, 2198U, 2239U, 2280U, 2321U, 2363U, 2406U, 2449U, 2493U, 2537U,
2582U, 2627U, 2673U, 2719U, 2765U, 2813U, 2860U, 2909U, 2958U, 3007U,
3057U, 3107U, 3158U, 3209U, 3261U, 3313U, 3366U, 3419U, 3473U, 3527U,
3582U, 3637U, 3693U, 3748U, 3806U, 3863U, 3921U, 3979U, 4037U, 4096U
};
/*
* Gamma 1.8 envelope for power-on/off. The transition progress is advanced
* independently of the requested brightness, so every turn-on takes about
* 700 ms and every turn-off takes about 800 ms. Linear interpolation between
* table entries prevents visible 1% steps.
*/
static const uint16_t power_fade_gamma_q12[101] = {
0U, 1U, 4U, 7U, 12U, 19U, 26U, 34U, 43U, 54U,
65U, 77U, 90U, 104U, 119U, 135U, 151U, 169U, 187U, 206U,
226U, 247U, 268U, 291U, 314U, 338U, 363U, 388U, 414U, 441U,
469U, 498U, 527U, 557U, 588U, 619U, 651U, 684U, 718U, 752U,
787U, 823U, 859U, 897U, 934U, 973U, 1012U, 1052U, 1093U, 1134U,
1176U, 1219U, 1262U, 1306U, 1351U, 1396U, 1442U, 1489U, 1536U, 1585U,
1633U, 1682U, 1732U, 1783U, 1834U, 1886U, 1939U, 1992U, 2046U, 2100U,
2155U, 2211U, 2268U, 2325U, 2382U, 2440U, 2499U, 2559U, 2619U, 2680U,
2741U, 2803U, 2866U, 2929U, 2993U, 3057U, 3122U, 3188U, 3254U, 3321U,
3388U, 3456U, 3525U, 3594U, 3664U, 3735U, 3806U, 3877U, 3950U, 4023U,
4096U
};
static uint16_t current_brightness_q12;
static uint16_t power_fade_progress_q12;
static uint16_t power_fade_remainder;
static uint8_t power_fade_direction;
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 volatile uint8_t feedback_active;
static volatile uint8_t feedback_on;
static uint16_t brightness_scale_for_level(uint8_t level)
{
if(level == 0U) return 0U;
if(level < BRIGHTNESS_MIN_PERCENT) level = BRIGHTNESS_MIN_PERCENT;
if(level > BRIGHTNESS_MAX_PERCENT) level = BRIGHTNESS_MAX_PERCENT;
return brightness_gamma_q12[level - 1U];
}
static uint16_t output_brightness_scale_for_level(uint8_t level)
{
if(level == 0U) return 0U;
if(level < BRIGHTNESS_MIN_PERCENT) level = BRIGHTNESS_MIN_PERCENT;
if(level > BRIGHTNESS_MAX_PERCENT) level = BRIGHTNESS_MAX_PERCENT;
if(Mode == mode3 &&
(choose_mode_falsg == 7U || choose_mode_falsg == 8U))
return brightness_scale_for_level(level);
if(W_PWM != 0U && C_PWM != 0U)
return mixed_brightness_gamma_q12[level - 1U];
return brightness_scale_for_level(level);
}
static uint16_t approach_brightness_scale(uint16_t current, uint16_t target)
{
uint16_t delta;
uint16_t step;
if(current == target) return current;
if(current < target)
{
delta = target - current;
step = (uint16_t)((delta + ((1U << BRIGHTNESS_SMOOTH_SHIFT) - 1U)) >>
BRIGHTNESS_SMOOTH_SHIFT);
return current + step;
}
delta = current - target;
step = (uint16_t)((delta + ((1U << BRIGHTNESS_SMOOTH_SHIFT) - 1U)) >>
BRIGHTNESS_SMOOTH_SHIFT);
return current - step;
}
static uint16_t approach_target(uint16_t current, uint16_t target)
{
uint16_t delta;
uint16_t step;
if(current == target) return current;
if(current < target)
{
delta = target - current;
step = (uint16_t)((delta + ((1U << OUTPUT_SMOOTH_SHIFT) - 1U)) >>
OUTPUT_SMOOTH_SHIFT);
return current + step;
}
delta = current - target;
step = (uint16_t)((delta + ((1U << OUTPUT_SMOOTH_SHIFT) - 1U)) >>
OUTPUT_SMOOTH_SHIFT);
return current - step;
}
static uint16_t interpolate_mode_output(uint16_t start, uint16_t target,
uint8_t tick)
{
uint32_t delta;
if(tick >= MODE_TRANSITION_TICKS) return target;
if(target >= start)
{
delta = (uint32_t)(target - start) * tick;
return (uint16_t)(start +
((delta + (MODE_TRANSITION_TICKS / 2U)) /
MODE_TRANSITION_TICKS));
}
delta = (uint32_t)(start - target) * tick;
return (uint16_t)(start -
((delta + (MODE_TRANSITION_TICKS / 2U)) /
MODE_TRANSITION_TICKS));
}
static uint16_t effect_gamma_output(uint16_t level)
{
if(level == 0U) return 0U;
if(level > 100U) level = 100U;
return (uint16_t)(
((uint32_t)brightness_gamma_q12[level - 1U] *
LIGHT_OUTPUT_SCALE + 2048U) >> 12);
}
static uint16_t power_fade_scale(uint16_t progress_q12)
{
uint32_t position;
uint16_t index;
uint16_t fraction;
uint16_t lower;
uint16_t upper;
if(progress_q12 >= POWER_FADE_Q12_MAX) return POWER_FADE_Q12_MAX;
position = (uint32_t)progress_q12 * 100U;
index = (uint16_t)(position >> 12);
fraction = (uint16_t)(position & 0x0FFFU);
lower = power_fade_gamma_q12[index];
upper = power_fade_gamma_q12[index + 1U];
return (uint16_t)(lower +
(((uint32_t)(upper - lower) * fraction + 2048U) >> 12));
}
static void update_power_fade(uint8_t powered_on)
{
uint16_t step;
if(powered_on)
{
if(power_fade_direction != 1U)
{
power_fade_direction = 1U;
power_fade_remainder = 0U;
}
if(power_fade_progress_q12 >= POWER_FADE_Q12_MAX) return;
step = POWER_FADE_ON_STEP;
power_fade_remainder += POWER_FADE_ON_REMAINDER;
if(power_fade_remainder >= POWER_FADE_ON_TICKS)
{
power_fade_remainder -= POWER_FADE_ON_TICKS;
step++;
}
if(step >= POWER_FADE_Q12_MAX - power_fade_progress_q12)
power_fade_progress_q12 = POWER_FADE_Q12_MAX;
else
power_fade_progress_q12 += step;
}
else
{
if(power_fade_direction != 2U)
{
power_fade_direction = 2U;
power_fade_remainder = 0U;
}
if(power_fade_progress_q12 == 0U) return;
step = POWER_FADE_OFF_STEP;
power_fade_remainder += POWER_FADE_OFF_REMAINDER;
if(power_fade_remainder >= POWER_FADE_OFF_TICKS)
{
power_fade_remainder -= POWER_FADE_OFF_TICKS;
step++;
}
if(step >= power_fade_progress_q12)
power_fade_progress_q12 = 0U;
else
power_fade_progress_q12 -= step;
}
}
void Light_Transition_SyncBrightness(uint8_t level)
{
current_brightness_q12 = output_brightness_scale_for_level(level);
power_fade_progress_q12 =
level == 0U ? 0U : POWER_FADE_Q12_MAX;
power_fade_remainder = 0U;
power_fade_direction = 0U;
transition_sync_pending = 1U;
}
void Light_Transition_BeginModeChange(void)
{
mode_transition_start_w = W_PWM_duty;
mode_transition_start_c = C_PWM_duty;
mode_transition_tick = 0U;
Light_Transition_ModeActive = 1U;
}
void Light_Transition_SetFeedback(uint8_t active, uint8_t on)
{
feedback_active = active ? 1U : 0U;
feedback_on = (active && on) ? 1U : 0U;
if(feedback_active)
{
W_PWM_duty = feedback_on ? LIGHT_OUTPUT_SCALE : 0U;
C_PWM_duty = 0U;
Light_Transition_W_Output_Q12 =
feedback_on ? ((uint32_t)LIGHT_OUTPUT_SCALE << 12) : 0U;
Light_Transition_C_Output_Q12 = 0U;
Light_Transition_FadeActive = 1U;
}
}
uint8_t Light_Transition_FeedbackActive(void)
{
return feedback_active;
}
void Light_Transition_Task(void)
{
uint8_t powered_on = deviceStatus != POWEROFF;
uint16_t target_w;
uint16_t target_c;
uint16_t target_total;
uint16_t target_brightness_scale;
uint16_t brightness_scale;
uint16_t fade_scale;
uint16_t mix_total;
uint16_t weak_mix;
uint16_t required_total;
uint16_t floor_w;
uint32_t scaled_w_q12;
uint32_t scaled_c_q12;
uint8_t power_transitioning;
/*
* Pairing/clear feedback is an output-only overlay. Keep all normal
* brightness, color, mode and power state untouched while it is active.
*/
if(feedback_active)
{
W_PWM_duty = feedback_on ? LIGHT_OUTPUT_SCALE : 0U;
C_PWM_duty = 0U;
Light_Transition_W_Output_Q12 =
feedback_on ? ((uint32_t)LIGHT_OUTPUT_SCALE << 12) : 0U;
Light_Transition_C_Output_Q12 = 0U;
Light_Transition_FadeActive = 1U;
return;
}
if(!powered_on)
Light_Transition_ModeActive = 0U;
/*
* Keep APP brightness tracking while off. Power fading is a separate
* envelope, so on/off duration does not change with the saved brightness.
*/
target_brightness_scale = output_brightness_scale_for_level(Brightness);
current_brightness_q12 =
approach_brightness_scale(current_brightness_q12,
target_brightness_scale);
update_power_fade(powered_on);
fade_scale = power_fade_scale(power_fade_progress_q12);
brightness_scale = current_brightness_q12;
power_transitioning =
powered_on ? (power_fade_progress_q12 < POWER_FADE_Q12_MAX)
: (power_fade_progress_q12 != 0U);
if(Mode == mode3 && choose_mode_falsg == 7U)
{
/*
* 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.
*/
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;
}
else if(Mode == mode1)
{
target_w = (uint16_t)(
((uint32_t)effect_gamma_output(W_PWM) *
brightness_scale + 2048U) >> 12);
target_c = (uint16_t)(
((uint32_t)effect_gamma_output(C_PWM) *
brightness_scale + 2048U) >> 12);
}
else
{
target_w =
(uint16_t)(((uint32_t)W_PWM * brightness_scale *
(LIGHT_OUTPUT_SCALE / 100U) + 2048U) >> 12);
target_c =
(uint16_t)(((uint32_t)C_PWM * brightness_scale *
(LIGHT_OUTPUT_SCALE / 100U) + 2048U) >> 12);
}
/*
* Keep the weaker mixed-light direction at the measured stable threshold.
* Raise the combined output only when the requested W:C ratio needs it.
* A ratio that cannot provide 102/1000 to its weak side even at full
* brightness is treated as single color.
*/
if(W_PWM != 0U && C_PWM != 0U &&
!(Mode == mode1 &&
(choose_mode_falsg == 5U || choose_mode_falsg == 6U)) &&
!(Mode == mode3 &&
(choose_mode_falsg == 7U || choose_mode_falsg == 8U)))
{
mix_total = (uint16_t)(W_PWM + C_PWM);
weak_mix = (W_PWM < C_PWM) ? W_PWM : C_PWM;
required_total = (uint16_t)(
((uint32_t)DUAL_MIN_STABLE_CHANNEL_OUTPUT * mix_total +
weak_mix - 1U) / weak_mix);
if(required_total > LIGHT_OUTPUT_SCALE)
{
if(W_PWM < C_PWM)
target_w = 0U;
else
target_c = 0U;
}
else if((uint16_t)(target_w + target_c) < required_total)
{
floor_w = (uint16_t)(
((uint32_t)required_total * W_PWM +
(mix_total / 2U)) / mix_total);
if(floor_w == 0U) floor_w = 1U;
if(floor_w >= required_total)
floor_w = required_total - 1U;
target_w = floor_w;
target_c = required_total - floor_w;
}
}
scaled_w_q12 = (uint32_t)target_w * fade_scale;
scaled_c_q12 = (uint32_t)target_c * fade_scale;
Light_Transition_W_Output_Q12 = scaled_w_q12;
Light_Transition_C_Output_Q12 = scaled_c_q12;
target_w = (uint16_t)((scaled_w_q12 + 2048U) >> 12);
target_c = (uint16_t)((scaled_c_q12 + 2048U) >> 12);
if(Mode == mode1 && powered_on && !power_transitioning)
{
if(W_PWM != 0U && target_w < BREATH_MIN_OUTPUT)
target_w = BREATH_MIN_OUTPUT;
if(C_PWM != 0U && target_c < BREATH_MIN_OUTPUT)
target_c = BREATH_MIN_OUTPUT;
}
if(Light_Transition_ModeActive && powered_on && !power_transitioning)
{
mode_transition_tick++;
W_PWM_duty =
interpolate_mode_output(mode_transition_start_w, target_w,
mode_transition_tick);
C_PWM_duty =
interpolate_mode_output(mode_transition_start_c, target_c,
mode_transition_tick);
if(mode_transition_tick >= MODE_TRANSITION_TICKS)
Light_Transition_ModeActive = 0U;
}
else if(((Mode == mode2 || Mode == mode3) && powered_on) ||
power_transitioning ||
transition_sync_pending)
{
W_PWM_duty = target_w;
C_PWM_duty = target_c;
}
else
{
W_PWM_duty = approach_target(W_PWM_duty, target_w);
C_PWM_duty = approach_target(C_PWM_duty, target_c);
}
transition_sync_pending = 0U;
Light_Transition_FadeActive =
!powered_on && (power_fade_progress_q12 != 0U ||
W_PWM_duty != 0U || C_PWM_duty != 0U);
}
@@ -0,0 +1,20 @@
#ifndef LIGHT_TRANSITION_H
#define LIGHT_TRANSITION_H
#include <stdint.h>
extern volatile uint8_t Light_Transition_FadeActive;
extern volatile uint8_t Light_Transition_ModeActive;
extern volatile uint32_t Light_Transition_W_Output_Q12;
extern volatile uint32_t Light_Transition_C_Output_Q12;
#define Light_Transition_RequestOn() (Light_Transition_FadeActive = 0U)
#define Light_Transition_RequestOff() (Light_Transition_FadeActive = 1U)
void Light_Transition_Task(void);
void Light_Transition_SyncBrightness(uint8_t level);
void Light_Transition_BeginModeChange(void);
void Light_Transition_SetFeedback(uint8_t active, uint8_t on);
uint8_t Light_Transition_FeedbackActive(void);
#endif
@@ -4,6 +4,14 @@
// extern uint8_t ble_flash_operation_can_check(void);
#include "ota_protocol.h"
#include "fmc_spi.h"
#include "PWM.h"
#define USER_DATA_FLASH_ADDR 0x1E000UL
#define USER_FLASH_WRITE_CHUNKS 16U
#define USER_FLASH_CHUNK_GAP_MS 20U
static uint8_t user_flash_write_chunk;
static uint8_t user_flash_chunk_gap_ms;
op_flash_t op_flash = {
OP_IDEL,
};
@@ -62,9 +70,43 @@ void ble_flash_handle(void)
{
// LOGI("FMC_SPI_Flash_WritePage: op_flash.op_addr=%x\n",
// op_flash.op_addr);
if(op_flash.op_addr == USER_DATA_FLASH_ADDR)
{
if(user_flash_chunk_gap_ms != 0U)
{
user_flash_chunk_gap_ms--;
return;
}
uint32_t chunk_offset =
(uint32_t)user_flash_write_chunk * 16U;
Bridge_FlashBlank_Request();
if(Bridge_FlashBlank_Ready() == 0U)
return;
GLOBAL_INT_DISABLE();
FMC_SPI_Flash_Write16Bytes(
op_flash.op_addr + chunk_offset,
&op_flash.op_buff[chunk_offset]);
GLOBAL_INT_RESTORE();
Bridge_FlashBlank_Resume();
user_flash_write_chunk++;
if(user_flash_write_chunk < USER_FLASH_WRITE_CHUNKS) {
user_flash_chunk_gap_ms = USER_FLASH_CHUNK_GAP_MS;
return;
}
user_flash_write_chunk = 0U;
user_flash_chunk_gap_ms = 0U;
}
else
{
GLOBAL_INT_DISABLE();
FMC_SPI_Flash_WritePage(op_flash.op_addr, op_flash.op_buff, 256);
GLOBAL_INT_RESTORE();
}
op_flash.op_state = OP_IDEL;
app_op_flash_flag = 2;
@@ -83,29 +125,39 @@ void ble_flash_handle(void)
}
} else if (op_flash.op_state == OP_WIAT_PAGE_ERASE) {
{
if(op_flash.op_addr == USER_DATA_FLASH_ADDR) {
Bridge_FlashBlank_Request();
if(Bridge_FlashBlank_Ready() == 0U)
return;
}
GLOBAL_INT_DISABLE();
FMC_SPI_Flash_Erase_Page(op_flash.op_addr);
GLOBAL_INT_RESTORE();
if(op_flash.op_addr == USER_DATA_FLASH_ADDR) {
Bridge_FlashBlank_Resume();
user_flash_write_chunk = 0U;
user_flash_chunk_gap_ms = 0U;
}
op_flash.op_state = OP_IDEL;
app_op_flash_flag = 1;
}
}
}
uint8_t app_data[128] = {0};
uint8_t app_data[FLASH_PAGE_SIZE] = {0};
//uint16_t app_op_flash_start = 10000;
void app_op_flash(void)
{
if(op_flash.op_state == OP_IDEL&&app_op_flash_flag ==0)
if(op_flash.op_state == OP_IDEL && app_op_flash_flag == 0U)
{
ble_flash_later_page_erase(0x1E000);
ble_flash_later_page_erase(USER_DATA_FLASH_ADDR);
}
else if(op_flash.op_state == OP_IDEL &&app_op_flash_flag ==1)
else if(op_flash.op_state == OP_IDEL && app_op_flash_flag == 1U)
{
ble_flash_later_write_page(app_data,0x1E000);
ble_flash_later_write_page(app_data, USER_DATA_FLASH_ADDR);
}
}
@@ -7,7 +7,9 @@
#endif // (USE_ROM_FLASH)
#endif // !(USE_XIP)
#include <stdint.h>
void xc_fmc_spi_flash_write_16bytes(uint32_t addr, uint8_t *data);
#define FMC_SPI_Flash_WritePage xc_fmc_spi_flash_write_page
#define FMC_SPI_Flash_Write16Bytes xc_fmc_spi_flash_write_16bytes
#define FMC_SPI_Flash_ReadPage xc_fmc_spi_flash_read_page
#define FMC_SPI_Flash_Erase_Sector FMC_SPI_Flash_Erase_Sector
#define FMC_SPI_Flash_Erase_Page xc_fmc_spi_flash_erase_page
@@ -42,5 +44,3 @@ int ble_flash_later_write_page(uint8_t *buff, uint32_t PageAddR);
int ble_flash_later_sector_erase(uint32_t addr);
#endif // __OTA_FLASH_INTERFACE_H_
@@ -0,0 +1,657 @@
#include "rf433_decoder.h"
#include "rf433_decoder_port.h"
#define RF433_FIFO_SIZE 256u
#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_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;
Rf433DecoderFrame_t frame;
bool frame_ready;
} Rf433Decode_t;
static Rf433Fifo_t s_fifo;
static Rf433Decode_t s_dec;
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_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;
rf433_decode_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 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++;
}
}
else
{
s_dec.last_code = code;
s_dec.same_cnt = 1;
}
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();
}
}
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++;
}
}
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,16 @@
#ifndef __RF433_DECODER_PORT_H__
#define __RF433_DECODER_PORT_H__
#ifndef RF433_DECODER_LOG
#define RF433_DECODER_LOG(fmt, ...) ((void)0)
#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
@@ -92,17 +92,26 @@ void timer0_2_init(void)
timer_cfg.timer_div_clk = TIMER_DIV_CLK_16MHzOr16K;
timer_cfg.timer_mode = TIMER_MODE_CYCLE;
/* Timer0 is the independent 1 kHz bridge direction scheduler. */
xc_timer_init(TIMER0_IDX, &timer_cfg);
xc_timer_set_value(TIMER0_IDX, us);
xc_timer_start(TIMER0_IDX);
xc_timer_init(TIMER1_IDX, &timer_cfg);
xc_timer_set_value(TIMER1_IDX, us);
xc_timer_start(TIMER1_IDX);
// Timer2 Config & Start
// Timer2 remains at 100 us for RF433 sampling.
xc_timer_init(TIMER2_IDX, &timer_cfg);
xc_timer_set_value(TIMER2_IDX, 100); //10us
xc_timer_set_value(TIMER2_IDX, 100);
xc_timer_start(TIMER2_IDX);
NVIC_SetPriority((IRQn_Type)TIMER2_IRQn,0);
NVIC_EnableIRQ((IRQn_Type)TIMER2_IRQn);
}
NVIC_SetPriority((IRQn_Type)TIMER0_IRQn, 0);
NVIC_EnableIRQ(TIMER0_IRQn);
NVIC_SetPriority((IRQn_Type)TIMER1_IRQn, 3);
NVIC_EnableIRQ(TIMER1_IRQn);
NVIC_SetPriority((IRQn_Type)TIMER2_IRQn, 1);
NVIC_EnableIRQ(TIMER2_IRQn);
}
@@ -117,8 +126,8 @@ void timer0_2_init(void)
*/
__RAM_CODE void timer0_callback(void *context)
{
// timer_status.t0_flag = true;
(void)context;
Bridge_Service_1ms();
}
/**
@@ -138,6 +147,7 @@ __RAM_CODE void timer1_callback(void *context)
updateTimer(&timer2);
}
/**
@@ -145,84 +155,18 @@ __RAM_CODE void timer1_callback(void *context)
* @details Timer2 handler callback function
* @param void *context
* @retval void
* 100us模拟1kHZ PWM
* Timer2 remains dedicated to 100 us RF433 sampling.
*/
uint8_t aa=0;
__RAM_CODE void timer2_callback(void *context) //10us
__RAM_CODE void timer2_callback(void *context)
{
(void)context;
rf433_receive();
if(deviceStatus==POWERON){
timeCnt++;
if(W_PWM_duty==0){deadTime_W=0;}
else {deadTime_W=_deadTime;}
if(C_PWM_duty==0){deadTime_C=0;}
else {deadTime_C=_deadTime;}
uint16_t totalPhase = (W_PWM_duty+deadTime_W) + (C_PWM_duty+deadTime_C) + 2*deadTime; //看注释为什么要这样加(W_PWM_duty+deadTime_W) + (C_PWM_duty+deadTime_C)
switch (driveMode)
{
case 0: // 正+反交替(周期切换)
if (timeCnt < deadTime)
{
xc_gpio_write_pin(IO_PWM_W, GPIO_PIN_RESET); // 互补输出低
xc_gpio_write_pin(IO_PWM_C, GPIO_PIN_RESET); // 主输出高
}
else
{
if (timeCnt <(deadTime + W_PWM_duty)) // 正转段
{
xc_gpio_write_pin(IO_PWM_W, GPIO_PIN_SET); // 互补输出低
xc_gpio_write_pin(IO_PWM_C, GPIO_PIN_RESET); // 主输出高
}
else if (timeCnt < deadTime + W_PWM_duty + deadTime) // 死区时间
{
xc_gpio_write_pin(IO_PWM_W, GPIO_PIN_RESET); // 互补输出低
xc_gpio_write_pin(IO_PWM_C, GPIO_PIN_RESET); // 主输出高
}
else if (timeCnt < (totalPhase)) // 反转段
{
xc_gpio_write_pin(IO_PWM_C, GPIO_PIN_SET); // 互补输出低
xc_gpio_write_pin(IO_PWM_W, GPIO_PIN_RESET); // 主输出高
}
else
{
xc_gpio_write_pin(IO_PWM_W, GPIO_PIN_RESET); // 互补输出低
xc_gpio_write_pin(IO_PWM_C, GPIO_PIN_RESET); // 主输出高
}
}
break;
case 1: // 只正转
if(timeCnt<=W_PWM_duty){
xc_gpio_write_pin(IO_PWM_C, GPIO_PIN_RESET); // 主输出高
xc_gpio_write_pin(IO_PWM_W, GPIO_PIN_SET); // 互补输出低
aa=0;
}else{
xc_gpio_write_pin(IO_PWM_W, GPIO_PIN_RESET); // 互补输出低
xc_gpio_write_pin(IO_PWM_C, GPIO_PIN_RESET); // 主输出高
aa=1;
}
break;
case 2: // 只反转
if(timeCnt<=C_PWM_duty){
xc_gpio_write_pin(IO_PWM_W, GPIO_PIN_RESET); // 互补输出低
xc_gpio_write_pin(IO_PWM_C, GPIO_PIN_SET); // 主输出高
}else{
xc_gpio_write_pin(IO_PWM_W, GPIO_PIN_RESET); // 互补输出低
xc_gpio_write_pin(IO_PWM_C, GPIO_PIN_RESET); // 主输出高
}
break;
default:
xc_gpio_write_pin(IO_PWM_W, GPIO_PIN_RESET); // 互补输出低
xc_gpio_write_pin(IO_PWM_C, GPIO_PIN_RESET); // 主输出高
break;
}
if (timeCnt >= PWMMAX){timeCnt = 0;}
}
}
__RAM_CODE void timer3_callback(void *context)
{
(void)context;
Bridge_Deadtime_Expired();
}
@@ -9,9 +9,12 @@
#include "timer.h"
#include "mode.h"
#include "RF433.h"
#include "rf433_decoder.h"
#include "ota_flash_interface.h"
#include "ota_protocol.h"
#include "pwm.h"
#include "light_transition.h"
#include "usr_server.h"
/*********************************************************************************************************************/
void rwip_schedule(void);
@@ -21,13 +24,15 @@ TASK_COMPONENTS TaskComps[] =
{0, 100, 30, ble_message_process}, //蓝牙处理任务
{0, 0, 0, app_op_flash_on},
{0,1,1,choice_mode},
{0,1,1,set_mode},
{0,5,5,set_mode},
{0,1,1,Set_timing},
{0,100,100,scan_433},
{0, 100,3, Encoder_key},
{0,1,1,My_ADC_Get_Value},
{0,50,50,ble_state_sync_poll},
{0, 311, 1, app_op_flash}, //用户数据持久化 fmc_spi_read9
{0, 311, 1, xc_ota_schedule}, //保存flash数据任务 8 //最后调用的
{0, 1, 1, rf433_decoder_process},
};
/**************************************************************************************
@@ -37,6 +37,7 @@
#include "timer.h"
#include "math.h"
#include "timeslice.h"
#include "fmc_spi.h"
/*------------------------------------------------------------------------------------
Macros
@@ -83,7 +84,6 @@ void uart_receive_cb(uint8_t *buff, uint16_t len)
void scan_uar_data(uint8_t *frame){
}
extern uint8_t sss;
uint8_t rx_date;
void scan_uart(uint8_t *arr)
{
@@ -105,8 +105,7 @@ void scan_uart(uint8_t *arr)
checksum += user_rx_buf[i];
}
user_rx_buf[5] = checksum; // 校验位
sss=1;
// printf("sss=%d\r\n",sss);
set_TaskComps_timer(2U, 1000U);
switch (user_rx_buf[4])
{
@@ -124,38 +123,37 @@ void scan_uart(uint8_t *arr)
break;
case 2:
if(POWEROFF==deviceStatus)break;
if(user_rx_buf[1] < 1U || user_rx_buf[1] > (EFFECT_MODE_MAX + 1U)) break;
choose_mode_bh=0;
choose_mode_falsg=user_rx_buf[1]-1;
choose_mode_falsg=user_rx_buf[1]-1U;
startTimer(&timer1,1);
break;
case 3:
case 5:
break;
case 3:
if(POWEROFF==deviceStatus)break;
if(Mode==mode0){
if(user_rx_buf[1] < BRIGHTNESS_MIN_PERCENT)
user_rx_buf[1] = BRIGHTNESS_MIN_PERCENT;
else if(user_rx_buf[1] > BRIGHTNESS_MAX_PERCENT)
user_rx_buf[1] = BRIGHTNESS_MAX_PERCENT;
Brightness = user_rx_buf[1];
}
break;
case 4:
if(POWEROFF==deviceStatus)break;
if(Mode==mode0){
if(user_rx_buf[1]<=20)user_rx_buf[1]=20;
Brightness=user_rx_buf[1]/10;
}
break;
case 5:
if(POWEROFF==deviceStatus)break;
if(user_rx_buf[1] > SPEED_MAX_LEVEL)
user_rx_buf[1] = SPEED_MAX_LEVEL;
Speed =user_rx_buf[1];
break;
case 6:
if(POWEROFF==deviceStatus)break;
if(user_rx_buf[1]<=5){
temperature(250);
}
else if(user_rx_buf[1]>=250){
temperature(50);
}else {
temperature(227-(57 +(((user_rx_buf[1] - 5)* 110) / 245)));
}
temperature(user_rx_buf[1]);
Mode=mode0;
choose_mode_bh=0;
choose_mode_falsg=10;//圆环模式
choose_mode_falsg=CUSTOM_TEMPERATURE_MODE;//圆环模式
startTimer(&timer1,1);
break;
case 10:
@@ -173,6 +171,9 @@ void scan_uart(uint8_t *arr)
flag_1h=flag_1h*60000;
//flag_1h=2000;
break;
case 12:
power_restore_policy_set(user_rx_buf[1]);
break;
case 9:
break;
@@ -12,6 +12,9 @@
****************************************************************************************
*/
#include "usr_server.h"
#include "Mode.h"
#include "PWM.h"
#include "fmc_spi.h"
#if (BLE_APP_PRESENT)
uint8_t srv_user_lid = GATT_INVALID_USER_LID;
@@ -83,6 +86,110 @@ uint16_t srv_get_hdl_from_att_idx(uint8_t idx)
}
uint8_t send_flag=1;
#define BLE_STATE_DIRTY_POWER 0x01U
#define BLE_STATE_DIRTY_MODE 0x02U
#define BLE_STATE_DIRTY_BRIGHTNESS 0x04U
#define BLE_STATE_DIRTY_SPEED 0x08U
#define BLE_STATE_DIRTY_TEMPERATURE 0x10U
#define BLE_STATE_DIRTY_POWER_MODE 0x20U
#define BLE_STATE_DIRTY_ALL 0x3FU
static uint8_t ble_state_dirty = BLE_STATE_DIRTY_ALL;
static uint8_t ble_last_power;
static uint8_t ble_last_mode;
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 uint8_t ble_temperature_value(void)
{
uint16_t warm = W_PWM > 100U ? 100U : W_PWM;
return (uint8_t)((warm * 255U + 50U) / 100U);
}
void ble_state_disconnect(void)
{
custom_svc_tx_char_notify = DISABLE;
send_flag = 1U;
ble_state_dirty = BLE_STATE_DIRTY_ALL;
}
void ble_state_sync_poll(void)
{
uint8_t data[4] = {0U, 0U, 0U, 0U};
uint8_t value;
uint8_t sent_mask;
struct app_env_tag *app_env = get_app_env();
if(!app_env->slave_connected || !custom_svc_tx_char_notify) return;
if((deviceStatus == POWERON) != ble_last_power)
ble_state_dirty |= BLE_STATE_DIRTY_POWER;
if((uint8_t)(choose_mode_falsg + 1U) != ble_last_mode)
ble_state_dirty |= BLE_STATE_DIRTY_MODE;
if(Brightness != ble_last_brightness)
ble_state_dirty |= BLE_STATE_DIRTY_BRIGHTNESS;
if(Speed != ble_last_speed)
ble_state_dirty |= BLE_STATE_DIRTY_SPEED;
if(Mode == mode0 && ble_temperature_value() != ble_last_temperature)
ble_state_dirty |= BLE_STATE_DIRTY_TEMPERATURE;
if(power_restore_policy != ble_last_power_mode)
ble_state_dirty |= BLE_STATE_DIRTY_POWER_MODE;
if(!send_flag || !ble_state_dirty) return;
if(ble_state_dirty & BLE_STATE_DIRTY_POWER)
{
value = deviceStatus == POWERON;
data[3] = 0x01U;
sent_mask = BLE_STATE_DIRTY_POWER;
}
else if(ble_state_dirty & BLE_STATE_DIRTY_MODE)
{
value = choose_mode_falsg + 1U;
data[3] = 0x02U;
sent_mask = BLE_STATE_DIRTY_MODE;
}
else if(ble_state_dirty & BLE_STATE_DIRTY_BRIGHTNESS)
{
value = Brightness;
data[3] = 0x04U;
sent_mask = BLE_STATE_DIRTY_BRIGHTNESS;
}
else if(ble_state_dirty & BLE_STATE_DIRTY_SPEED)
{
value = Speed;
data[3] = 0x05U;
sent_mask = BLE_STATE_DIRTY_SPEED;
}
else if(ble_state_dirty & BLE_STATE_DIRTY_TEMPERATURE)
{
value = ble_temperature_value();
data[3] = 0x06U;
sent_mask = BLE_STATE_DIRTY_TEMPERATURE;
}
else
{
value = power_restore_policy;
data[3] = 0x0CU;
sent_mask = BLE_STATE_DIRTY_POWER_MODE;
}
data[0] = value;
if(slave_send_data(data, sizeof(data), CUSTOM_SVC_TX_CHAR_VAL) == GATT_NO_ERROR)
{
if(sent_mask == BLE_STATE_DIRTY_POWER) ble_last_power = value;
else if(sent_mask == BLE_STATE_DIRTY_MODE) ble_last_mode = value;
else if(sent_mask == BLE_STATE_DIRTY_BRIGHTNESS) ble_last_brightness = value;
else if(sent_mask == BLE_STATE_DIRTY_SPEED) ble_last_speed = value;
else if(sent_mask == BLE_STATE_DIRTY_TEMPERATURE) ble_last_temperature = value;
else ble_last_power_mode = value;
ble_state_dirty &= (uint8_t)(~sent_mask);
}
}
// This function is called when GATT server user has initiated event send to
// peer device or if an error occurs.
__STATIC void custom_svc_cb_event_sent(uint8_t conidx, uint8_t user_lid,
@@ -137,11 +244,11 @@ __STATIC __RAM_CODE void custom_svc_cb_att_val_set(uint8_t conidx, uint8_t user_
if (hdl == srv_get_hdl_from_att_idx(CUSTOM_SVC_TX_CHAR_CFG)) {
if ((co_buf_data(p_data)[0] == 0) && (co_buf_data(p_data)[1] == 0)) {
//custom_svc_tx_char_notify = DISABLE;
custom_svc_tx_char_notify = DISABLE;
} else {
//custom_svc_tx_char_notify = ENABLE;
/// uint8_t data[] = {0x12, 0x13, 0x14};
// slave_send_data(data, sizeof(data), CUSTOM_SVC_TX_CHAR_VAL);
custom_svc_tx_char_notify = ENABLE;
send_flag = 1U;
ble_state_dirty = BLE_STATE_DIRTY_ALL;
}
}
/*==========================================*/
@@ -185,6 +292,7 @@ uint8_t slave_send_data(uint8_t *data, uint8_t len, uint8_t att_idx)
srv_get_hdl_from_att_idx(att_idx), len,
data);
if (status != GATT_NO_ERROR) {
send_flag=1;
LOGI_ERR("gatt_srv_notify error 0x%x", status);
}
}
@@ -21,7 +21,7 @@
#include "xc_gatt_server_api.h"
#define CUSTOM_SVC_UUID 0xFFF0
#define CUSTOM_SVC_RX_CHAR_UUID 0xFFFC
#define CUSTOM_SVC_RX_CHAR_UUID 0xFFE4
#define CUSTOM_SVC_TX_CHAR_UUID 0xFFF4
#define CUSTOM_SVC_RX_CHAR_VAL_MAX_LENGTH 120
#define CUSTOM_SVC_TX_CHAR_VAL_MAX_LENGTH 120
@@ -47,4 +47,6 @@ extern uint8_t custom_svc_tx_char_notify;
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);
#endif // _USR_SERVER_H_
@@ -20,6 +20,7 @@ LOAD 0x1100E000
*(ram_em)
}
ScatterAssert((0x530077b0)+ImageLength(RW2) < 0x53008000)
ScatterAssert(ImageLength(EXE) <= 0x10000)
}
@@ -22,6 +22,7 @@ LOAD 0x11011000
*(ram_em)
}
ScatterAssert((0x530077b0)+ImageLength(RW2) < 0x53008000)
ScatterAssert(ImageLength(EXE) <= 0xD000)
}
File diff suppressed because it is too large Load Diff
@@ -358,10 +358,10 @@ ARM Macro Assembler Page 6
000000FF
00000000
Command Line: --debug --xref --diag_suppress=9931 --cpu=Cortex-M0 --apcs=interw
ork --depend=.\objects\startup_xinc.d -o.\objects\startup_xinc.o -IC:\keil5\ARM
\CMSIS\5.9.0\Device\ARM\ARMCM0\Include --predefine="__UVISION_VERSION SETA 538"
--predefine="ARMCM0 SETA 1" --list=.\listings\startup_xinc.lst ..\app\src\star
tup_xinc.s
ork --depend=.\objects\startup_xinc.d -o.\objects\startup_xinc.o -I"D:\Program
Files\Keil_v5\ARM\Packs\ARM\CMSIS\5.9.0\Device\ARM\ARMCM0\Include" --predefine=
"__UVISION_VERSION SETA 538" --predefine="ARMCM0 SETA 1" --list=.\listings\star
tup_xinc.lst ..\app\src\startup_xinc.s
@@ -5,65 +5,61 @@
<h2>Tool Versions:</h2>
IDE-Version: μVision V5.38.0.0
Copyright (C) 2022 ARM Ltd and ARM Germany GmbH. All rights reserved.
License Information: 11 2, 2, LIC=76F5U-SYBLY-EVY1R-KVDFR-ABNKT-H3E3R
License Information: 1 850080437@qq.com, 1, LIC=NQQMA-13CNA-CXTU6-D7Z3Q-D9AMV-Y9G1D
Tool Versions:
Toolchain: MDK-ARM Plus Version: 5.38.0.0
Toolchain Path: C:\keil5\ARM\ARMCC\Bin
C Compiler: Armcc.exe V5.06 update 7 (build 960)
Assembler: Armasm.exe V5.06 update 7 (build 960)
Linker/Locator: ArmLink.exe V5.06 update 7 (build 960)
Library Manager: ArmAr.exe V5.06 update 7 (build 960)
Hex Converter: FromElf.exe V5.06 update 7 (build 960)
Toolchain Path: D:\Program Files\Keil_v5\ARM\ARMCC\Bin
C Compiler: Armcc.exe V5.06 update 6 (build 750)
Assembler: Armasm.exe V5.06 update 6 (build 750)
Linker/Locator: ArmLink.exe V5.06 update 6 (build 750)
Library Manager: ArmAr.exe V5.06 update 6 (build 750)
Hex Converter: FromElf.exe V5.06 update 6 (build 750)
CPU DLL: SARMCM3.DLL V5.38.0.0
Dialog DLL: DARMCM1.DLL V1.19.6.0
Target DLL: UL2CM3.DLL V1.164.8.0
Dialog DLL: TARMCM1.DLL V1.14.6.0
<h2>Project:</h2>
C:\Users\31158\Desktop\蓝牙礼盒\PWM31E\hpw32e(2线3线款)\hpw32e(2线3线款)\project\example\ble\ble_peripheral\mdk\ble_peripheral.uvprojx
Project File Date: 04/09/2026
D:\workplace\工作文件\程序\新向远XC6517蓝牙芯片\PWM32EPRO\project\example\ble\ble_peripheral\mdk\ble_peripheral.uvprojx
Project File Date: 07/26/2026
<h2>Output:</h2>
*** Using Compiler 'V5.06 update 7 (build 960)', folder: 'C:\keil5\ARM\ARMCC\Bin'
*** 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 '..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_spi.c' - object file renamed from '.\Objects\xc_drv_spi.o' to '.\Objects\xc_drv_spi_1.o'.
Note: source file '..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_fmc_spi.c' - object file renamed from '.\Objects\xc_drv_fmc_spi.o' to '.\Objects\xc_drv_fmc_spi_1.o'.
Note: source file '..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_fmc_spi.c' - object file renamed from '.\Objects\xc_drv_fmc_spi.o' to '.\Objects\xc_drv_fmc_spi_1.o'.
Note: source file '..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_spi.c' - object file renamed from '.\Objects\xc_drv_spi.o' to '.\Objects\xc_drv_spi_1.o'.
Note: source file '..\app\src\uart.c' - object file renamed from '.\Objects\uart.o' to '.\Objects\uart_1.o'.
compiling xc_drv_spi.c...
..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_fmc_spi.h(230): warning: #47-D: incompatible redefinition of macro "CUR_PAGE_NUM" (declared at line 115 of "..\..\..\..\..\component\ble\modules\flash\xc6xxx_fmc_spi.h")
#define CUR_PAGE_NUM(addr) (addr / FLASH_PAGE_SIZE)
..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_fmc_spi.h(231): warning: #47-D: incompatible redefinition of macro "CUR_START_PSR" (declared at line 116 of "..\..\..\..\..\component\ble\modules\flash\xc6xxx_fmc_spi.h")
#define CUR_START_PSR(addr) (addr % FLASH_PAGE_SIZE)
..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_fmc_spi.h(237): warning: #47-D: incompatible redefinition of macro "FMC_IDLE_STATUS" (declared at line 78 of "..\..\..\..\..\component\ble\modules\flash\xc6xxx_fmc_spi.h")
#define FMC_IDLE_STATUS ((uint32_t)0x01 << 31)
..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_spi.c: 3 warnings, 0 errors
compiling xc_drv_fmc_spi.c...
..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_fmc_spi.h(230): warning: #47-D: incompatible redefinition of macro "CUR_PAGE_NUM" (declared at line 115 of "..\..\..\..\..\component\ble\modules\flash\xc6xxx_fmc_spi.h")
#define CUR_PAGE_NUM(addr) (addr / FLASH_PAGE_SIZE)
..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_fmc_spi.h(231): warning: #47-D: incompatible redefinition of macro "CUR_START_PSR" (declared at line 116 of "..\..\..\..\..\component\ble\modules\flash\xc6xxx_fmc_spi.h")
#define CUR_START_PSR(addr) (addr % FLASH_PAGE_SIZE)
..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_fmc_spi.h(237): warning: #47-D: incompatible redefinition of macro "FMC_IDLE_STATUS" (declared at line 78 of "..\..\..\..\..\component\ble\modules\flash\xc6xxx_fmc_spi.h")
#define FMC_IDLE_STATUS ((uint32_t)0x01 << 31)
..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_fmc_spi.c: 3 warnings, 0 errors
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
void choice_mode();
..\app\src\mode.h(40): 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
void Start_PWM();
..\app\src\mode.h(42): 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
void Set_timing();
..\app\src\light_transition.c: 9 warnings, 0 errors
linking...
.\Objects\Xinc_ble_sdk.axf: Warning: L6304W: Duplicate input file .\objects\xc_drv_fmc_spi_1.o ignored.
.\Objects\Xinc_ble_sdk.axf: Warning: L6304W: Duplicate input file .\objects\xc_drv_spi_1.o ignored.
.\Linker\cpu_xip_scan.scat(16): warning: L6329W: Pattern uread4.o(.text) only matches removed unused sections.
Program Size: Code=25664 RO-data=1368 RW-data=2676 ZI-data=3700
Finished: 0 information, 3 warning and 0 error messages.
Program Size: Code=27716 RO-data=1380 RW-data=2740 ZI-data=3700
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: 27312 bytes.
all_size=27312
Size of file: 29380 bytes.
all_size=29380
dual_xip
Addr:13000
Size:0x6ab0
Size:0x72c4
BAddr:0x40000
Acheck:0x34822540
Acheck:0x42b99760
SoftVer:0x10
RomVer:0x20
LoadAddr:0x11013000
@@ -90,8 +86,7 @@ status2=1
需要填充0个sector
updata file success !
已复制 1 个文件。
系统找不到指定的路径
已复制 0 个文件
已复制 1 个文件。
".\Objects\Xinc_ble_sdk.axf" - 0 Error(s), 9 Warning(s).
<h2>Software Packages used:</h2>
@@ -102,10 +97,10 @@ Package Vendor: ARM
CMSIS (Common Microcontroller Software Interface Standard)
<h2>Collection of Component include folders:</h2>
C:/keil5/ARM/CMSIS/5.9.0/Device/ARM/ARMCM0/Include
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:15
Build Time Elapsed: 00:00:07
</pre>
</body>
</html>
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -14,8 +14,6 @@
"..\app\src\rom_symdefs.o"
".\objects\xc_drv_dma.o"
".\objects\xc_drv_spi_dma.o"
".\objects\xc_drv_spi_1.o"
".\objects\xc_drv_fmc_spi_1.o"
".\objects\xc_drv_pwm.o"
".\objects\rf_extrc.o"
".\objects\ringbuffer.o"
@@ -26,13 +24,13 @@
".\objects\xc_drv_uart.o"
".\objects\xc_drv_wdt.o"
".\objects\xc_drv_systick.o"
".\objects\xc_drv_fmc_spi_1.o"
".\objects\xc_drv_fmc_spi.o"
".\objects\xc_drv_calib.o"
".\objects\xc_drv_adc.o"
".\objects\xc_drv_pga.o"
".\objects\xc_drv_aotimer.o"
".\objects\xc_drv_rtc.o"
".\objects\xc_drv_spi_1.o"
".\objects\xc_drv_spi.o"
".\objects\xc_gap_api.o"
".\objects\xc_gatt_client_api.o"
".\objects\xc_gatt_server_api.o"
@@ -45,6 +43,8 @@
".\objects\mode.o"
".\objects\rf433.o"
".\objects\pwm.o"
".\objects\bridge_pwm.o"
".\objects\light_transition.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
@@ -1,7 +1,7 @@
.\objects\aes.o: ..\app\src\aes.c
.\objects\aes.o: ..\..\..\..\..\component\ble\modules\aes\api\aes.h
.\objects\aes.o: ..\..\..\..\..\component\ble\modules\rwip\api\rwip_config.h
.\objects\aes.o: C:\keil5\ARM\ARMCC\Bin\..\include\string.h
.\objects\aes.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\string.h
.\objects\aes.o: ..\..\..\..\..\component\ble\ip\ble\ll\api\rwble_config.h
.\objects\aes.o: ..\..\..\..\..\component\ble\modules\rwip\api\rwip_config.h
.\objects\aes.o: ..\..\..\..\..\component\ble\ip\ble\hl\inc\rwble_hl_config.h
@@ -9,9 +9,9 @@
.\objects\aes.o: ..\..\..\..\..\component\ble\ip\ble\hl\inc\rwprf_config.h
.\objects\aes.o: ..\app\api\rwapp_config.h
.\objects\aes.o: ..\..\..\..\..\component\ble\modules\common\api\co_bt.h
.\objects\aes.o: C:\keil5\ARM\ARMCC\Bin\..\include\stdbool.h
.\objects\aes.o: C:\keil5\ARM\ARMCC\Bin\..\include\stddef.h
.\objects\aes.o: C:\keil5\ARM\ARMCC\Bin\..\include\stdint.h
.\objects\aes.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stdbool.h
.\objects\aes.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stddef.h
.\objects\aes.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stdint.h
.\objects\aes.o: ..\..\..\..\..\component\ble\modules\common\api\co_bt_defines.h
.\objects\aes.o: ..\..\..\..\..\component\ble\modules\common\api\co_lmp.h
.\objects\aes.o: ..\..\..\..\..\component\ble\modules\common\api\co_bt.h
@@ -19,7 +19,7 @@
.\objects\aes.o: ..\..\..\..\..\component\ble\plf\refip\src\arch\compiler\gnuarm\compiler.h
.\objects\aes.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc6xxx.h
.\objects\aes.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc60xx.h
.\objects\aes.o: C:\keil5\ARM\ARMCC\Bin\..\include\stdio.h
.\objects\aes.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stdio.h
.\objects\aes.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\core_cm0.h
.\objects\aes.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\core_cmInstr.h
.\objects\aes.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\core_cmFunc.h
@@ -59,7 +59,7 @@
.\objects\aes.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_dma.h
.\objects\aes.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_spi.h
.\objects\aes.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_spi_dma.h
.\objects\aes.o: C:\keil5\ARM\ARMCC\Bin\..\include\stdlib.h
.\objects\aes.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stdlib.h
.\objects\aes.o: ..\..\..\..\..\component\ble\modules\flash\xc6xxx_fmc_spi.h
.\objects\aes.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_fmc_spi_dma.h
.\objects\aes.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_uart_dma.h
Binary file not shown.
@@ -1,6 +1,6 @@
.\objects\app_batt.o: ..\app\src\app_batt.c
.\objects\app_batt.o: ..\..\..\..\..\component\ble\modules\rwip\api\rwip_config.h
.\objects\app_batt.o: C:\keil5\ARM\ARMCC\Bin\..\include\string.h
.\objects\app_batt.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\string.h
.\objects\app_batt.o: ..\..\..\..\..\component\ble\ip\ble\ll\api\rwble_config.h
.\objects\app_batt.o: ..\..\..\..\..\component\ble\modules\rwip\api\rwip_config.h
.\objects\app_batt.o: ..\..\..\..\..\component\ble\ip\ble\hl\inc\rwble_hl_config.h
@@ -8,13 +8,13 @@
.\objects\app_batt.o: ..\..\..\..\..\component\ble\ip\ble\hl\inc\rwprf_config.h
.\objects\app_batt.o: ..\app\api\rwapp_config.h
.\objects\app_batt.o: ..\app\src\app_batt.h
.\objects\app_batt.o: C:\keil5\ARM\ARMCC\Bin\..\include\stdint.h
.\objects\app_batt.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stdint.h
.\objects\app_batt.o: ..\..\..\..\..\component\ble\modules\ke\api\ke_task.h
.\objects\app_batt.o: C:\keil5\ARM\ARMCC\Bin\..\include\stdbool.h
.\objects\app_batt.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stdbool.h
.\objects\app_batt.o: ..\..\..\..\..\component\ble\plf\refip\src\arch\compiler\gnuarm\compiler.h
.\objects\app_batt.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc6xxx.h
.\objects\app_batt.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc60xx.h
.\objects\app_batt.o: C:\keil5\ARM\ARMCC\Bin\..\include\stdio.h
.\objects\app_batt.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stdio.h
.\objects\app_batt.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\core_cm0.h
.\objects\app_batt.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\core_cmInstr.h
.\objects\app_batt.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\core_cmFunc.h
@@ -54,7 +54,7 @@
.\objects\app_batt.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_dma.h
.\objects\app_batt.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_spi.h
.\objects\app_batt.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_spi_dma.h
.\objects\app_batt.o: C:\keil5\ARM\ARMCC\Bin\..\include\stdlib.h
.\objects\app_batt.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stdlib.h
.\objects\app_batt.o: ..\..\..\..\..\component\ble\modules\flash\xc6xxx_fmc_spi.h
.\objects\app_batt.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_fmc_spi_dma.h
.\objects\app_batt.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_uart_dma.h
@@ -64,7 +64,7 @@
.\objects\app_batt.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_adc.h
.\objects\app_batt.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_pwm.h
.\objects\app_batt.o: ..\..\..\..\..\component\ble\modules\ke\api\ke_msg.h
.\objects\app_batt.o: C:\keil5\ARM\ARMCC\Bin\..\include\stddef.h
.\objects\app_batt.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stddef.h
.\objects\app_batt.o: ..\..\..\..\..\component\ble\plf\refip\src\arch\arch.h
.\objects\app_batt.o: ..\..\..\..\..\component\ble\plf\refip\src\arch\compiler\gnuarm\compiler.h
.\objects\app_batt.o: ..\..\..\..\..\component\ble\plf\refip\src\arch\ll\gnuarm\ll.h
@@ -1,6 +1,6 @@
.\objects\app_sec.o: ..\app\src\app_sec.c
.\objects\app_sec.o: ..\..\..\..\..\component\ble\modules\rwip\api\rwip_config.h
.\objects\app_sec.o: C:\keil5\ARM\ARMCC\Bin\..\include\string.h
.\objects\app_sec.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\string.h
.\objects\app_sec.o: ..\..\..\..\..\component\ble\ip\ble\ll\api\rwble_config.h
.\objects\app_sec.o: ..\..\..\..\..\component\ble\modules\rwip\api\rwip_config.h
.\objects\app_sec.o: ..\..\..\..\..\component\ble\ip\ble\hl\inc\rwble_hl_config.h
@@ -8,10 +8,10 @@
.\objects\app_sec.o: ..\..\..\..\..\component\ble\ip\ble\hl\inc\rwprf_config.h
.\objects\app_sec.o: ..\app\api\rwapp_config.h
.\objects\app_sec.o: ..\..\..\..\..\component\ble\modules\common\api\co_utils.h
.\objects\app_sec.o: C:\keil5\ARM\ARMCC\Bin\..\include\stdint.h
.\objects\app_sec.o: C:\keil5\ARM\ARMCC\Bin\..\include\stddef.h
.\objects\app_sec.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stdint.h
.\objects\app_sec.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stddef.h
.\objects\app_sec.o: ..\..\..\..\..\component\ble\modules\common\api\co_bt.h
.\objects\app_sec.o: C:\keil5\ARM\ARMCC\Bin\..\include\stdbool.h
.\objects\app_sec.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stdbool.h
.\objects\app_sec.o: ..\..\..\..\..\component\ble\modules\common\api\co_bt_defines.h
.\objects\app_sec.o: ..\..\..\..\..\component\ble\modules\common\api\co_lmp.h
.\objects\app_sec.o: ..\..\..\..\..\component\ble\modules\common\api\co_bt.h
@@ -19,7 +19,7 @@
.\objects\app_sec.o: ..\..\..\..\..\component\ble\plf\refip\src\arch\compiler\gnuarm\compiler.h
.\objects\app_sec.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc6xxx.h
.\objects\app_sec.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc60xx.h
.\objects\app_sec.o: C:\keil5\ARM\ARMCC\Bin\..\include\stdio.h
.\objects\app_sec.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stdio.h
.\objects\app_sec.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\core_cm0.h
.\objects\app_sec.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\core_cmInstr.h
.\objects\app_sec.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\core_cmFunc.h
@@ -59,7 +59,7 @@
.\objects\app_sec.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_dma.h
.\objects\app_sec.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_spi.h
.\objects\app_sec.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_spi_dma.h
.\objects\app_sec.o: C:\keil5\ARM\ARMCC\Bin\..\include\stdlib.h
.\objects\app_sec.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stdlib.h
.\objects\app_sec.o: ..\..\..\..\..\component\ble\modules\flash\xc6xxx_fmc_spi.h
.\objects\app_sec.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_fmc_spi_dma.h
.\objects\app_sec.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_uart_dma.h
@@ -1,6 +1,6 @@
.\objects\app_task.o: ..\app\src\app_task.c
.\objects\app_task.o: ..\..\..\..\..\component\ble\modules\rwip\api\rwip_config.h
.\objects\app_task.o: C:\keil5\ARM\ARMCC\Bin\..\include\string.h
.\objects\app_task.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\string.h
.\objects\app_task.o: ..\..\..\..\..\component\ble\ip\ble\ll\api\rwble_config.h
.\objects\app_task.o: ..\..\..\..\..\component\ble\modules\rwip\api\rwip_config.h
.\objects\app_task.o: ..\..\..\..\..\component\ble\ip\ble\hl\inc\rwble_hl_config.h
@@ -8,8 +8,8 @@
.\objects\app_task.o: ..\..\..\..\..\component\ble\ip\ble\hl\inc\rwprf_config.h
.\objects\app_task.o: ..\app\api\rwapp_config.h
.\objects\app_task.o: ..\app\src\app_sec.h
.\objects\app_task.o: C:\keil5\ARM\ARMCC\Bin\..\include\stdint.h
.\objects\app_task.o: C:\keil5\ARM\ARMCC\Bin\..\include\stdbool.h
.\objects\app_task.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stdint.h
.\objects\app_task.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stdbool.h
.\objects\app_task.o: ..\app\api\app_task.h
.\objects\app_task.o: ..\..\..\..\..\component\ble\modules\common\api\co_bt_defines.h
.\objects\app_task.o: ..\..\..\..\..\component\ble\modules\dbg\api\dbg.h
@@ -23,7 +23,7 @@
.\objects\app_task.o: ..\..\..\..\..\component\ble\plf\refip\src\arch\compiler\gnuarm\compiler.h
.\objects\app_task.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc6xxx.h
.\objects\app_task.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc60xx.h
.\objects\app_task.o: C:\keil5\ARM\ARMCC\Bin\..\include\stdio.h
.\objects\app_task.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stdio.h
.\objects\app_task.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\core_cm0.h
.\objects\app_task.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\core_cmInstr.h
.\objects\app_task.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\core_cmFunc.h
@@ -63,7 +63,7 @@
.\objects\app_task.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_dma.h
.\objects\app_task.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_spi.h
.\objects\app_task.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_spi_dma.h
.\objects\app_task.o: C:\keil5\ARM\ARMCC\Bin\..\include\stdlib.h
.\objects\app_task.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stdlib.h
.\objects\app_task.o: ..\..\..\..\..\component\ble\modules\flash\xc6xxx_fmc_spi.h
.\objects\app_task.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_fmc_spi_dma.h
.\objects\app_task.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_uart_dma.h
@@ -73,7 +73,7 @@
.\objects\app_task.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_adc.h
.\objects\app_task.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_pwm.h
.\objects\app_task.o: ..\..\..\..\..\component\ble\modules\common\api\co_bt.h
.\objects\app_task.o: C:\keil5\ARM\ARMCC\Bin\..\include\stddef.h
.\objects\app_task.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stddef.h
.\objects\app_task.o: ..\..\..\..\..\component\ble\modules\common\api\co_lmp.h
.\objects\app_task.o: ..\..\..\..\..\component\ble\modules\common\api\co_bt.h
.\objects\app_task.o: ..\..\..\..\..\component\ble\modules\common\api\co_hci.h
@@ -1,6 +1,6 @@
.\objects\arch_main.o: ..\app\src\arch_main.c
.\objects\arch_main.o: ..\..\..\..\..\component\ble\modules\rwip\api\rwip_config.h
.\objects\arch_main.o: C:\keil5\ARM\ARMCC\Bin\..\include\string.h
.\objects\arch_main.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\string.h
.\objects\arch_main.o: ..\..\..\..\..\component\ble\ip\ble\ll\api\rwble_config.h
.\objects\arch_main.o: ..\..\..\..\..\component\ble\modules\rwip\api\rwip_config.h
.\objects\arch_main.o: ..\..\..\..\..\component\ble\ip\ble\hl\inc\rwble_hl_config.h
@@ -10,9 +10,9 @@
.\objects\arch_main.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_pwr.h
.\objects\arch_main.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc6xxx.h
.\objects\arch_main.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc60xx.h
.\objects\arch_main.o: C:\keil5\ARM\ARMCC\Bin\..\include\stdio.h
.\objects\arch_main.o: C:\keil5\ARM\ARMCC\Bin\..\include\stdint.h
.\objects\arch_main.o: C:\keil5\ARM\ARMCC\Bin\..\include\stdbool.h
.\objects\arch_main.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stdio.h
.\objects\arch_main.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stdint.h
.\objects\arch_main.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stdbool.h
.\objects\arch_main.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\core_cm0.h
.\objects\arch_main.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\core_cmInstr.h
.\objects\arch_main.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\core_cmFunc.h
@@ -52,7 +52,7 @@
.\objects\arch_main.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_dma.h
.\objects\arch_main.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_spi.h
.\objects\arch_main.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_spi_dma.h
.\objects\arch_main.o: C:\keil5\ARM\ARMCC\Bin\..\include\stdlib.h
.\objects\arch_main.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stdlib.h
.\objects\arch_main.o: ..\..\..\..\..\component\ble\modules\flash\xc6xxx_fmc_spi.h
.\objects\arch_main.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_fmc_spi_dma.h
.\objects\arch_main.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_uart_dma.h
@@ -73,7 +73,7 @@
.\objects\arch_main.o: ..\..\..\..\..\component\ble\ip\ble\hl\api\gap.h
.\objects\arch_main.o: ..\..\..\..\..\component\ble\plf\refip\src\arch\compiler\gnuarm\compiler.h
.\objects\arch_main.o: ..\..\..\..\..\component\ble\modules\common\api\co_bt.h
.\objects\arch_main.o: C:\keil5\ARM\ARMCC\Bin\..\include\stddef.h
.\objects\arch_main.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stddef.h
.\objects\arch_main.o: ..\..\..\..\..\component\ble\modules\common\api\co_lmp.h
.\objects\arch_main.o: ..\..\..\..\..\component\ble\modules\common\api\co_bt.h
.\objects\arch_main.o: ..\..\..\..\..\component\ble\modules\common\api\co_hci.h
@@ -129,7 +129,7 @@
.\objects\arch_main.o: ..\..\..\..\..\component\ble\modules\rf\api\rf.h
.\objects\arch_main.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\core_cm0.h
.\objects\arch_main.o: ..\app\src\pwm.h
.\objects\arch_main.o: C:\keil5\ARM\ARMCC\Bin\..\include\math.h
.\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\rgblight.h
File diff suppressed because one or more lines are too long
@@ -0,0 +1,61 @@
.\objects\bridge_pwm.o: ..\app\src\bridge_pwm.c
.\objects\bridge_pwm.o: ..\app\src\pwm.h
.\objects\bridge_pwm.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stdio.h
.\objects\bridge_pwm.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\string.h
.\objects\bridge_pwm.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stdint.h
.\objects\bridge_pwm.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\math.h
.\objects\bridge_pwm.o: ..\app\src\mode.h
.\objects\bridge_pwm.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_gpio.h
.\objects\bridge_pwm.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stdbool.h
.\objects\bridge_pwm.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc6xxx.h
.\objects\bridge_pwm.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc60xx.h
.\objects\bridge_pwm.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\core_cm0.h
.\objects\bridge_pwm.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\core_cmInstr.h
.\objects\bridge_pwm.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\core_cmFunc.h
.\objects\bridge_pwm.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_conf.h
.\objects\bridge_pwm.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc_m0_register\xc_reg_cpr.h
.\objects\bridge_pwm.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc_m0_register\xc_reg_offset.h
.\objects\bridge_pwm.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc_m0_register\xc_reg_cprao.h
.\objects\bridge_pwm.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc_m0_register\xc_reg_rf.h
.\objects\bridge_pwm.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc_m0_register\xc_reg_adc.h
.\objects\bridge_pwm.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc_m0_register\xc_reg_aotimer.h
.\objects\bridge_pwm.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc6xxx.h
.\objects\bridge_pwm.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc_m0_register\xc_reg_dma.h
.\objects\bridge_pwm.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc_m0_register\xc_reg_fmc.h
.\objects\bridge_pwm.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc_m0_register\xc_reg_fmc_cache.h
.\objects\bridge_pwm.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc_m0_register\xc_reg_gpio.h
.\objects\bridge_pwm.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc_m0_register\xc_reg_i2c.h
.\objects\bridge_pwm.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc_m0_register\xc_reg_qdec.h
.\objects\bridge_pwm.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc_m0_register\xc_reg_pwm.h
.\objects\bridge_pwm.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc_m0_register\xc_reg_pwm_comn.h
.\objects\bridge_pwm.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc_m0_register\xc_reg_rtc.h
.\objects\bridge_pwm.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\core_cm0.h
.\objects\bridge_pwm.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc_m0_register\xc_reg_spi.h
.\objects\bridge_pwm.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc_m0_register\xc_reg_timer.h
.\objects\bridge_pwm.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc_m0_register\xc_reg_uart.h
.\objects\bridge_pwm.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc_m0_register\xc_reg_wdt.h
.\objects\bridge_pwm.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc_m0_register\xc_reg_pwm_timer.h
.\objects\bridge_pwm.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_calib.h
.\objects\bridge_pwm.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_clock.h
.\objects\bridge_pwm.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_systick.h
.\objects\bridge_pwm.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_pwr.h
.\objects\bridge_pwm.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_gpio.h
.\objects\bridge_pwm.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_aotimer.h
.\objects\bridge_pwm.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_timer.h
.\objects\bridge_pwm.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_rtc.h
.\objects\bridge_pwm.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_uart.h
.\objects\bridge_pwm.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\ringbuffer.h
.\objects\bridge_pwm.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_dma.h
.\objects\bridge_pwm.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_spi.h
.\objects\bridge_pwm.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_spi_dma.h
.\objects\bridge_pwm.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stdlib.h
.\objects\bridge_pwm.o: ..\..\..\..\..\component\ble\modules\flash\xc6xxx_fmc_spi.h
.\objects\bridge_pwm.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_fmc_spi_dma.h
.\objects\bridge_pwm.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_uart_dma.h
.\objects\bridge_pwm.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_i2c.h
.\objects\bridge_pwm.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_sw_i2c.h
.\objects\bridge_pwm.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_wdt.h
.\objects\bridge_pwm.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_adc.h
.\objects\bridge_pwm.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_pwm.h
.\objects\bridge_pwm.o: ..\app\src\xc_drv_pwm.h
.\objects\bridge_pwm.o: ..\app\src\light_transition.h
@@ -1,12 +1,12 @@
.\objects\fmc_spi.o: ..\app\src\fmc_spi.c
.\objects\fmc_spi.o: ..\app\src\fmc_spi.h
.\objects\fmc_spi.o: C:\keil5\ARM\ARMCC\Bin\..\include\stdio.h
.\objects\fmc_spi.o: C:\keil5\ARM\ARMCC\Bin\..\include\string.h
.\objects\fmc_spi.o: C:\keil5\ARM\ARMCC\Bin\..\include\stdint.h
.\objects\fmc_spi.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stdio.h
.\objects\fmc_spi.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\string.h
.\objects\fmc_spi.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stdint.h
.\objects\fmc_spi.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_fmc_spi.h
.\objects\fmc_spi.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc6xxx.h
.\objects\fmc_spi.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc60xx.h
.\objects\fmc_spi.o: C:\keil5\ARM\ARMCC\Bin\..\include\stdbool.h
.\objects\fmc_spi.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stdbool.h
.\objects\fmc_spi.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\core_cm0.h
.\objects\fmc_spi.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\core_cmInstr.h
.\objects\fmc_spi.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\core_cmFunc.h
@@ -46,7 +46,7 @@
.\objects\fmc_spi.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_dma.h
.\objects\fmc_spi.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_spi.h
.\objects\fmc_spi.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_spi_dma.h
.\objects\fmc_spi.o: C:\keil5\ARM\ARMCC\Bin\..\include\stdlib.h
.\objects\fmc_spi.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stdlib.h
.\objects\fmc_spi.o: ..\..\..\..\..\component\ble\modules\flash\xc6xxx_fmc_spi.h
.\objects\fmc_spi.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_fmc_spi_dma.h
.\objects\fmc_spi.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_uart_dma.h
@@ -58,5 +58,5 @@
.\objects\fmc_spi.o: ..\app\src\rgblight.h
.\objects\fmc_spi.o: ..\app\src\mode.h
.\objects\fmc_spi.o: ..\app\src\PWM.h
.\objects\fmc_spi.o: C:\keil5\ARM\ARMCC\Bin\..\include\math.h
.\objects\fmc_spi.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\math.h
.\objects\fmc_spi.o: ..\app\src\RF433.h
@@ -0,0 +1,8 @@
.\objects\light_transition.o: ..\app\src\light_transition.c
.\objects\light_transition.o: ..\app\src\pwm.h
.\objects\light_transition.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stdio.h
.\objects\light_transition.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\string.h
.\objects\light_transition.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stdint.h
.\objects\light_transition.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\math.h
.\objects\light_transition.o: ..\app\src\mode.h
.\objects\light_transition.o: ..\app\src\light_transition.h
@@ -1,11 +1,11 @@
.\objects\mode.o: ..\app\src\Mode.c
.\objects\mode.o: ..\app\src\pwm.h
.\objects\mode.o: C:\keil5\ARM\ARMCC\Bin\..\include\stdio.h
.\objects\mode.o: C:\keil5\ARM\ARMCC\Bin\..\include\string.h
.\objects\mode.o: C:\keil5\ARM\ARMCC\Bin\..\include\stdint.h
.\objects\mode.o: C:\keil5\ARM\ARMCC\Bin\..\include\math.h
.\objects\mode.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stdio.h
.\objects\mode.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\string.h
.\objects\mode.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stdint.h
.\objects\mode.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\math.h
.\objects\mode.o: ..\app\src\xc_drv_pwm.h
.\objects\mode.o: C:\keil5\ARM\ARMCC\Bin\..\include\stdbool.h
.\objects\mode.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stdbool.h
.\objects\mode.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc6xxx.h
.\objects\mode.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc60xx.h
.\objects\mode.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\core_cm0.h
@@ -47,7 +47,7 @@
.\objects\mode.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_dma.h
.\objects\mode.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_spi.h
.\objects\mode.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_spi_dma.h
.\objects\mode.o: C:\keil5\ARM\ARMCC\Bin\..\include\stdlib.h
.\objects\mode.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stdlib.h
.\objects\mode.o: ..\..\..\..\..\component\ble\modules\flash\xc6xxx_fmc_spi.h
.\objects\mode.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_fmc_spi_dma.h
.\objects\mode.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_uart_dma.h
@@ -81,7 +81,7 @@
.\objects\mode.o: ..\..\..\..\..\component\ble\ip\ble\hl\api\gap.h
.\objects\mode.o: ..\..\..\..\..\component\ble\plf\refip\src\arch\compiler\gnuarm\compiler.h
.\objects\mode.o: ..\..\..\..\..\component\ble\modules\common\api\co_bt.h
.\objects\mode.o: C:\keil5\ARM\ARMCC\Bin\..\include\stddef.h
.\objects\mode.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stddef.h
.\objects\mode.o: ..\..\..\..\..\component\ble\modules\common\api\co_lmp.h
.\objects\mode.o: ..\..\..\..\..\component\ble\modules\common\api\co_bt.h
.\objects\mode.o: ..\..\..\..\..\component\ble\modules\common\api\co_hci.h
@@ -133,3 +133,4 @@
.\objects\mode.o: ..\..\..\..\..\component\ble\ip\ble\hl\src\gatt\gatt_db.h
.\objects\mode.o: ..\..\..\..\..\component\ble\ip\ble\api\xc_gap_api.h
.\objects\mode.o: ..\..\..\..\..\component\ble\ip\ble\hl\api\gapc_msg.h
.\objects\mode.o: ..\app\src\light_transition.h
@@ -1,6 +1,6 @@
.\objects\nvds.o: ..\..\..\..\..\component\ble\modules\nvds\src\nvds.c
.\objects\nvds.o: ..\..\..\..\..\component\ble\modules\rwip\api\rwip_config.h
.\objects\nvds.o: C:\keil5\ARM\ARMCC\Bin\..\include\string.h
.\objects\nvds.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\string.h
.\objects\nvds.o: ..\..\..\..\..\component\ble\ip\ble\ll\api\rwble_config.h
.\objects\nvds.o: ..\..\..\..\..\component\ble\modules\rwip\api\rwip_config.h
.\objects\nvds.o: ..\..\..\..\..\component\ble\ip\ble\hl\inc\rwble_hl_config.h
@@ -1,18 +1,18 @@
.\objects\ota_flash_interface.o: ..\app\src\ota_flash_interface.c
.\objects\ota_flash_interface.o: ..\app\src\ota_flash_interface.h
.\objects\ota_flash_interface.o: ..\..\..\..\..\component\ble\modules\flash\xc6xxx_fmc_spi.h
.\objects\ota_flash_interface.o: C:\keil5\ARM\ARMCC\Bin\..\include\stdio.h
.\objects\ota_flash_interface.o: C:\keil5\ARM\ARMCC\Bin\..\include\stdint.h
.\objects\ota_flash_interface.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stdio.h
.\objects\ota_flash_interface.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stdint.h
.\objects\ota_flash_interface.o: ..\..\..\..\..\component\ble\plf\refip\src\arch\arch.h
.\objects\ota_flash_interface.o: ..\..\..\..\..\component\ble\modules\rwip\api\rwip_config.h
.\objects\ota_flash_interface.o: C:\keil5\ARM\ARMCC\Bin\..\include\string.h
.\objects\ota_flash_interface.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\string.h
.\objects\ota_flash_interface.o: ..\..\..\..\..\component\ble\ip\ble\ll\api\rwble_config.h
.\objects\ota_flash_interface.o: ..\..\..\..\..\component\ble\modules\rwip\api\rwip_config.h
.\objects\ota_flash_interface.o: ..\..\..\..\..\component\ble\ip\ble\hl\inc\rwble_hl_config.h
.\objects\ota_flash_interface.o: ..\..\..\..\..\component\ble\ip\ble\hl\api\rwble_hl_error.h
.\objects\ota_flash_interface.o: ..\..\..\..\..\component\ble\ip\ble\hl\inc\rwprf_config.h
.\objects\ota_flash_interface.o: ..\app\api\rwapp_config.h
.\objects\ota_flash_interface.o: C:\keil5\ARM\ARMCC\Bin\..\include\stdbool.h
.\objects\ota_flash_interface.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stdbool.h
.\objects\ota_flash_interface.o: ..\..\..\..\..\component\ble\plf\refip\src\arch\compiler\gnuarm\compiler.h
.\objects\ota_flash_interface.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc6xxx.h
.\objects\ota_flash_interface.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc60xx.h
@@ -55,7 +55,7 @@
.\objects\ota_flash_interface.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_dma.h
.\objects\ota_flash_interface.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_spi.h
.\objects\ota_flash_interface.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_spi_dma.h
.\objects\ota_flash_interface.o: C:\keil5\ARM\ARMCC\Bin\..\include\stdlib.h
.\objects\ota_flash_interface.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stdlib.h
.\objects\ota_flash_interface.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_fmc_spi_dma.h
.\objects\ota_flash_interface.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_uart_dma.h
.\objects\ota_flash_interface.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_i2c.h
@@ -70,7 +70,7 @@
.\objects\ota_flash_interface.o: ..\..\..\..\..\component\ble\plf\refip\src\arch\compiler\gnuarm\compiler.h
.\objects\ota_flash_interface.o: ..\..\..\..\..\component\ble\plf\refip\src\driver\reg\reg_access.h
.\objects\ota_flash_interface.o: ..\..\..\..\..\component\ble\modules\common\api\co_utils.h
.\objects\ota_flash_interface.o: C:\keil5\ARM\ARMCC\Bin\..\include\stddef.h
.\objects\ota_flash_interface.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stddef.h
.\objects\ota_flash_interface.o: ..\..\..\..\..\component\ble\modules\common\api\co_bt.h
.\objects\ota_flash_interface.o: ..\..\..\..\..\component\ble\modules\common\api\co_bt_defines.h
.\objects\ota_flash_interface.o: ..\..\..\..\..\component\ble\modules\common\api\co_lmp.h
@@ -1,6 +1,6 @@
.\objects\ota_protocol.o: ..\app\src\ota_protocol.c
.\objects\ota_protocol.o: ..\..\..\..\..\component\ble\modules\rwip\api\rwip_config.h
.\objects\ota_protocol.o: C:\keil5\ARM\ARMCC\Bin\..\include\string.h
.\objects\ota_protocol.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\string.h
.\objects\ota_protocol.o: ..\..\..\..\..\component\ble\ip\ble\ll\api\rwble_config.h
.\objects\ota_protocol.o: ..\..\..\..\..\component\ble\modules\rwip\api\rwip_config.h
.\objects\ota_protocol.o: ..\..\..\..\..\component\ble\ip\ble\hl\inc\rwble_hl_config.h
@@ -9,11 +9,11 @@
.\objects\ota_protocol.o: ..\app\api\rwapp_config.h
.\objects\ota_protocol.o: ..\app\src\ota_flash_interface.h
.\objects\ota_protocol.o: ..\..\..\..\..\component\ble\modules\flash\xc6xxx_fmc_spi.h
.\objects\ota_protocol.o: C:\keil5\ARM\ARMCC\Bin\..\include\stdio.h
.\objects\ota_protocol.o: C:\keil5\ARM\ARMCC\Bin\..\include\stdint.h
.\objects\ota_protocol.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stdio.h
.\objects\ota_protocol.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stdint.h
.\objects\ota_protocol.o: ..\app\src\ota_protocol.h
.\objects\ota_protocol.o: ..\..\..\..\..\component\ble\plf\refip\src\arch\arch.h
.\objects\ota_protocol.o: C:\keil5\ARM\ARMCC\Bin\..\include\stdbool.h
.\objects\ota_protocol.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stdbool.h
.\objects\ota_protocol.o: ..\..\..\..\..\component\ble\plf\refip\src\arch\compiler\gnuarm\compiler.h
.\objects\ota_protocol.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc6xxx.h
.\objects\ota_protocol.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc60xx.h
@@ -56,7 +56,7 @@
.\objects\ota_protocol.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_dma.h
.\objects\ota_protocol.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_spi.h
.\objects\ota_protocol.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_spi_dma.h
.\objects\ota_protocol.o: C:\keil5\ARM\ARMCC\Bin\..\include\stdlib.h
.\objects\ota_protocol.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stdlib.h
.\objects\ota_protocol.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_fmc_spi_dma.h
.\objects\ota_protocol.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_uart_dma.h
.\objects\ota_protocol.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_i2c.h
@@ -71,7 +71,7 @@
.\objects\ota_protocol.o: ..\..\..\..\..\component\ble\plf\refip\src\arch\compiler\gnuarm\compiler.h
.\objects\ota_protocol.o: ..\..\..\..\..\component\ble\plf\refip\src\driver\reg\reg_access.h
.\objects\ota_protocol.o: ..\..\..\..\..\component\ble\modules\common\api\co_utils.h
.\objects\ota_protocol.o: C:\keil5\ARM\ARMCC\Bin\..\include\stddef.h
.\objects\ota_protocol.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stddef.h
.\objects\ota_protocol.o: ..\..\..\..\..\component\ble\modules\common\api\co_bt.h
.\objects\ota_protocol.o: ..\..\..\..\..\component\ble\modules\common\api\co_bt_defines.h
.\objects\ota_protocol.o: ..\..\..\..\..\component\ble\modules\common\api\co_lmp.h
@@ -1,6 +1,6 @@
.\objects\ota_server.o: ..\app\src\ota_server.c
.\objects\ota_server.o: ..\..\..\..\..\component\ble\modules\rwip\api\rwip_config.h
.\objects\ota_server.o: C:\keil5\ARM\ARMCC\Bin\..\include\string.h
.\objects\ota_server.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\string.h
.\objects\ota_server.o: ..\..\..\..\..\component\ble\ip\ble\ll\api\rwble_config.h
.\objects\ota_server.o: ..\..\..\..\..\component\ble\modules\rwip\api\rwip_config.h
.\objects\ota_server.o: ..\..\..\..\..\component\ble\ip\ble\hl\inc\rwble_hl_config.h
@@ -9,12 +9,12 @@
.\objects\ota_server.o: ..\app\api\rwapp_config.h
.\objects\ota_server.o: ..\app\src\ota_protocol.h
.\objects\ota_server.o: ..\..\..\..\..\component\ble\plf\refip\src\arch\arch.h
.\objects\ota_server.o: C:\keil5\ARM\ARMCC\Bin\..\include\stdint.h
.\objects\ota_server.o: C:\keil5\ARM\ARMCC\Bin\..\include\stdbool.h
.\objects\ota_server.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stdint.h
.\objects\ota_server.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stdbool.h
.\objects\ota_server.o: ..\..\..\..\..\component\ble\plf\refip\src\arch\compiler\gnuarm\compiler.h
.\objects\ota_server.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc6xxx.h
.\objects\ota_server.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc60xx.h
.\objects\ota_server.o: C:\keil5\ARM\ARMCC\Bin\..\include\stdio.h
.\objects\ota_server.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stdio.h
.\objects\ota_server.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\core_cm0.h
.\objects\ota_server.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\core_cmInstr.h
.\objects\ota_server.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\core_cmFunc.h
@@ -54,7 +54,7 @@
.\objects\ota_server.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_dma.h
.\objects\ota_server.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_spi.h
.\objects\ota_server.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_spi_dma.h
.\objects\ota_server.o: C:\keil5\ARM\ARMCC\Bin\..\include\stdlib.h
.\objects\ota_server.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stdlib.h
.\objects\ota_server.o: ..\..\..\..\..\component\ble\modules\flash\xc6xxx_fmc_spi.h
.\objects\ota_server.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_fmc_spi_dma.h
.\objects\ota_server.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_uart_dma.h
@@ -70,7 +70,7 @@
.\objects\ota_server.o: ..\..\..\..\..\component\ble\plf\refip\src\arch\compiler\gnuarm\compiler.h
.\objects\ota_server.o: ..\..\..\..\..\component\ble\plf\refip\src\driver\reg\reg_access.h
.\objects\ota_server.o: ..\..\..\..\..\component\ble\modules\common\api\co_utils.h
.\objects\ota_server.o: C:\keil5\ARM\ARMCC\Bin\..\include\stddef.h
.\objects\ota_server.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stddef.h
.\objects\ota_server.o: ..\..\..\..\..\component\ble\modules\common\api\co_bt.h
.\objects\ota_server.o: ..\..\..\..\..\component\ble\modules\common\api\co_bt_defines.h
.\objects\ota_server.o: ..\..\..\..\..\component\ble\modules\common\api\co_lmp.h
@@ -1,11 +1,11 @@
.\objects\pwm.o: ..\app\src\PWM.c
.\objects\pwm.o: ..\app\src\pwm.h
.\objects\pwm.o: C:\keil5\ARM\ARMCC\Bin\..\include\stdio.h
.\objects\pwm.o: C:\keil5\ARM\ARMCC\Bin\..\include\string.h
.\objects\pwm.o: C:\keil5\ARM\ARMCC\Bin\..\include\stdint.h
.\objects\pwm.o: C:\keil5\ARM\ARMCC\Bin\..\include\math.h
.\objects\pwm.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stdio.h
.\objects\pwm.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\string.h
.\objects\pwm.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stdint.h
.\objects\pwm.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\math.h
.\objects\pwm.o: ..\app\src\xc_drv_pwm.h
.\objects\pwm.o: C:\keil5\ARM\ARMCC\Bin\..\include\stdbool.h
.\objects\pwm.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stdbool.h
.\objects\pwm.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc6xxx.h
.\objects\pwm.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc60xx.h
.\objects\pwm.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\core_cm0.h
@@ -47,7 +47,7 @@
.\objects\pwm.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_dma.h
.\objects\pwm.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_spi.h
.\objects\pwm.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_spi_dma.h
.\objects\pwm.o: C:\keil5\ARM\ARMCC\Bin\..\include\stdlib.h
.\objects\pwm.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stdlib.h
.\objects\pwm.o: ..\..\..\..\..\component\ble\modules\flash\xc6xxx_fmc_spi.h
.\objects\pwm.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_fmc_spi_dma.h
.\objects\pwm.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_uart_dma.h
Binary file not shown.
@@ -1,10 +1,10 @@
.\objects\rf433.o: ..\app\src\Rf433.c
.\objects\rf433.o: ..\app\src\RF433.h
.\objects\rf433.o: C:\keil5\ARM\ARMCC\Bin\..\include\stdio.h
.\objects\rf433.o: C:\keil5\ARM\ARMCC\Bin\..\include\string.h
.\objects\rf433.o: C:\keil5\ARM\ARMCC\Bin\..\include\stdint.h
.\objects\rf433.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stdio.h
.\objects\rf433.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\string.h
.\objects\rf433.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stdint.h
.\objects\rf433.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_gpio.h
.\objects\rf433.o: C:\keil5\ARM\ARMCC\Bin\..\include\stdbool.h
.\objects\rf433.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stdbool.h
.\objects\rf433.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc6xxx.h
.\objects\rf433.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc60xx.h
.\objects\rf433.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\core_cm0.h
@@ -46,7 +46,7 @@
.\objects\rf433.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_dma.h
.\objects\rf433.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_spi.h
.\objects\rf433.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_spi_dma.h
.\objects\rf433.o: C:\keil5\ARM\ARMCC\Bin\..\include\stdlib.h
.\objects\rf433.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stdlib.h
.\objects\rf433.o: ..\..\..\..\..\component\ble\modules\flash\xc6xxx_fmc_spi.h
.\objects\rf433.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_fmc_spi_dma.h
.\objects\rf433.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_uart_dma.h
@@ -59,4 +59,4 @@
.\objects\rf433.o: ..\app\src\mode.h
.\objects\rf433.o: ..\app\src\timer.h
.\objects\rf433.o: ..\app\src\pwm.h
.\objects\rf433.o: C:\keil5\ARM\ARMCC\Bin\..\include\math.h
.\objects\rf433.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\math.h
@@ -1,6 +1,6 @@
.\objects\rf_extrc.o: ..\..\..\..\..\component\ble\modules\rf\src\rf_extrc.c
.\objects\rf_extrc.o: ..\..\..\..\..\component\ble\modules\rwip\api\rwip_config.h
.\objects\rf_extrc.o: C:\keil5\ARM\ARMCC\Bin\..\include\string.h
.\objects\rf_extrc.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\string.h
.\objects\rf_extrc.o: ..\..\..\..\..\component\ble\ip\ble\ll\api\rwble_config.h
.\objects\rf_extrc.o: ..\..\..\..\..\component\ble\modules\rwip\api\rwip_config.h
.\objects\rf_extrc.o: ..\..\..\..\..\component\ble\ip\ble\hl\inc\rwble_hl_config.h
@@ -8,13 +8,13 @@
.\objects\rf_extrc.o: ..\..\..\..\..\component\ble\ip\ble\hl\inc\rwprf_config.h
.\objects\rf_extrc.o: ..\app\api\rwapp_config.h
.\objects\rf_extrc.o: ..\..\..\..\..\component\ble\modules\common\api\co_math.h
.\objects\rf_extrc.o: C:\keil5\ARM\ARMCC\Bin\..\include\stdint.h
.\objects\rf_extrc.o: C:\keil5\ARM\ARMCC\Bin\..\include\stdbool.h
.\objects\rf_extrc.o: C:\keil5\ARM\ARMCC\Bin\..\include\stdlib.h
.\objects\rf_extrc.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stdint.h
.\objects\rf_extrc.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stdbool.h
.\objects\rf_extrc.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stdlib.h
.\objects\rf_extrc.o: ..\..\..\..\..\component\ble\plf\refip\src\arch\compiler\gnuarm\compiler.h
.\objects\rf_extrc.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc6xxx.h
.\objects\rf_extrc.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc60xx.h
.\objects\rf_extrc.o: C:\keil5\ARM\ARMCC\Bin\..\include\stdio.h
.\objects\rf_extrc.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stdio.h
.\objects\rf_extrc.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\core_cm0.h
.\objects\rf_extrc.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\core_cmInstr.h
.\objects\rf_extrc.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\core_cmFunc.h
@@ -71,7 +71,7 @@
.\objects\rf_extrc.o: ..\..\..\..\..\component\ble\plf\refip\src\arch\compiler\gnuarm\compiler.h
.\objects\rf_extrc.o: ..\..\..\..\..\component\ble\plf\refip\src\driver\reg\reg_access.h
.\objects\rf_extrc.o: ..\..\..\..\..\component\ble\modules\common\api\co_utils.h
.\objects\rf_extrc.o: C:\keil5\ARM\ARMCC\Bin\..\include\stddef.h
.\objects\rf_extrc.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stddef.h
.\objects\rf_extrc.o: ..\..\..\..\..\component\ble\modules\common\api\co_bt.h
.\objects\rf_extrc.o: ..\..\..\..\..\component\ble\modules\common\api\co_bt_defines.h
.\objects\rf_extrc.o: ..\..\..\..\..\component\ble\modules\common\api\co_lmp.h
@@ -1,10 +1,10 @@
.\objects\rgblight.o: ..\app\src\rgblight.c
.\objects\rgblight.o: ..\app\src\uart.h
.\objects\rgblight.o: C:\keil5\ARM\ARMCC\Bin\..\include\stdio.h
.\objects\rgblight.o: C:\keil5\ARM\ARMCC\Bin\..\include\string.h
.\objects\rgblight.o: C:\keil5\ARM\ARMCC\Bin\..\include\stdint.h
.\objects\rgblight.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stdio.h
.\objects\rgblight.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\string.h
.\objects\rgblight.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stdint.h
.\objects\rgblight.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\RINGBUFFER.h
.\objects\rgblight.o: C:\keil5\ARM\ARMCC\Bin\..\include\stdbool.h
.\objects\rgblight.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stdbool.h
.\objects\rgblight.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_uart.h
.\objects\rgblight.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc6xxx.h
.\objects\rgblight.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc60xx.h
@@ -46,7 +46,7 @@
.\objects\rgblight.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_dma.h
.\objects\rgblight.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_spi.h
.\objects\rgblight.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_spi_dma.h
.\objects\rgblight.o: C:\keil5\ARM\ARMCC\Bin\..\include\stdlib.h
.\objects\rgblight.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stdlib.h
.\objects\rgblight.o: ..\..\..\..\..\component\ble\modules\flash\xc6xxx_fmc_spi.h
.\objects\rgblight.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_fmc_spi_dma.h
.\objects\rgblight.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_uart_dma.h
@@ -76,7 +76,7 @@
.\objects\rgblight.o: ..\..\..\..\..\component\ble\ip\ble\hl\api\gap.h
.\objects\rgblight.o: ..\..\..\..\..\component\ble\plf\refip\src\arch\compiler\gnuarm\compiler.h
.\objects\rgblight.o: ..\..\..\..\..\component\ble\modules\common\api\co_bt.h
.\objects\rgblight.o: C:\keil5\ARM\ARMCC\Bin\..\include\stddef.h
.\objects\rgblight.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stddef.h
.\objects\rgblight.o: ..\..\..\..\..\component\ble\modules\common\api\co_lmp.h
.\objects\rgblight.o: ..\..\..\..\..\component\ble\modules\common\api\co_bt.h
.\objects\rgblight.o: ..\..\..\..\..\component\ble\modules\common\api\co_hci.h
@@ -1,5 +1,5 @@
.\objects\ringbuffer.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\ringbuffer.c
.\objects\ringbuffer.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\ringbuffer.h
.\objects\ringbuffer.o: C:\keil5\ARM\ARMCC\Bin\..\include\stdbool.h
.\objects\ringbuffer.o: C:\keil5\ARM\ARMCC\Bin\..\include\stdint.h
.\objects\ringbuffer.o: C:\keil5\ARM\ARMCC\Bin\..\include\stdio.h
.\objects\ringbuffer.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stdbool.h
.\objects\ringbuffer.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stdint.h
.\objects\ringbuffer.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stdio.h
@@ -1,6 +1,6 @@
.\objects\sleep.o: ..\app\src\sleep.c
.\objects\sleep.o: ..\..\..\..\..\component\ble\modules\rwip\api\rwip_config.h
.\objects\sleep.o: C:\keil5\ARM\ARMCC\Bin\..\include\string.h
.\objects\sleep.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\string.h
.\objects\sleep.o: ..\..\..\..\..\component\ble\ip\ble\ll\api\rwble_config.h
.\objects\sleep.o: ..\..\..\..\..\component\ble\modules\rwip\api\rwip_config.h
.\objects\sleep.o: ..\..\..\..\..\component\ble\ip\ble\hl\inc\rwble_hl_config.h
@@ -8,12 +8,12 @@
.\objects\sleep.o: ..\..\..\..\..\component\ble\ip\ble\hl\inc\rwprf_config.h
.\objects\sleep.o: ..\app\api\rwapp_config.h
.\objects\sleep.o: ..\..\..\..\..\component\ble\plf\refip\src\arch\arch.h
.\objects\sleep.o: C:\keil5\ARM\ARMCC\Bin\..\include\stdint.h
.\objects\sleep.o: C:\keil5\ARM\ARMCC\Bin\..\include\stdbool.h
.\objects\sleep.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stdint.h
.\objects\sleep.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stdbool.h
.\objects\sleep.o: ..\..\..\..\..\component\ble\plf\refip\src\arch\compiler\gnuarm\compiler.h
.\objects\sleep.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc6xxx.h
.\objects\sleep.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc60xx.h
.\objects\sleep.o: C:\keil5\ARM\ARMCC\Bin\..\include\stdio.h
.\objects\sleep.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stdio.h
.\objects\sleep.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\core_cm0.h
.\objects\sleep.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\core_cmInstr.h
.\objects\sleep.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\core_cmFunc.h
@@ -53,7 +53,7 @@
.\objects\sleep.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_dma.h
.\objects\sleep.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_spi.h
.\objects\sleep.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_spi_dma.h
.\objects\sleep.o: C:\keil5\ARM\ARMCC\Bin\..\include\stdlib.h
.\objects\sleep.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stdlib.h
.\objects\sleep.o: ..\..\..\..\..\component\ble\modules\flash\xc6xxx_fmc_spi.h
.\objects\sleep.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_fmc_spi_dma.h
.\objects\sleep.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_uart_dma.h
@@ -69,7 +69,7 @@
.\objects\sleep.o: ..\..\..\..\..\component\ble\plf\refip\src\arch\compiler\gnuarm\compiler.h
.\objects\sleep.o: ..\..\..\..\..\component\ble\plf\refip\src\driver\reg\reg_access.h
.\objects\sleep.o: ..\..\..\..\..\component\ble\modules\common\api\co_utils.h
.\objects\sleep.o: C:\keil5\ARM\ARMCC\Bin\..\include\stddef.h
.\objects\sleep.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stddef.h
.\objects\sleep.o: ..\..\..\..\..\component\ble\modules\common\api\co_bt.h
.\objects\sleep.o: ..\..\..\..\..\component\ble\modules\common\api\co_bt_defines.h
.\objects\sleep.o: ..\..\..\..\..\component\ble\modules\common\api\co_lmp.h
@@ -1,10 +1,10 @@
.\objects\system_xinc.o: ..\app\src\system_xinc.c
.\objects\system_xinc.o: C:\keil5\ARM\ARMCC\Bin\..\include\stdio.h
.\objects\system_xinc.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stdio.h
.\objects\system_xinc.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc6xxx.h
.\objects\system_xinc.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc60xx.h
.\objects\system_xinc.o: C:\keil5\ARM\ARMCC\Bin\..\include\stdint.h
.\objects\system_xinc.o: C:\keil5\ARM\ARMCC\Bin\..\include\stdbool.h
.\objects\system_xinc.o: C:\keil5\ARM\ARMCC\Bin\..\include\string.h
.\objects\system_xinc.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stdint.h
.\objects\system_xinc.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stdbool.h
.\objects\system_xinc.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\string.h
.\objects\system_xinc.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\core_cm0.h
.\objects\system_xinc.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\core_cmInstr.h
.\objects\system_xinc.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\core_cmFunc.h
@@ -44,7 +44,7 @@
.\objects\system_xinc.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_dma.h
.\objects\system_xinc.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_spi.h
.\objects\system_xinc.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_spi_dma.h
.\objects\system_xinc.o: C:\keil5\ARM\ARMCC\Bin\..\include\stdlib.h
.\objects\system_xinc.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stdlib.h
.\objects\system_xinc.o: ..\..\..\..\..\component\ble\modules\flash\xc6xxx_fmc_spi.h
.\objects\system_xinc.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_fmc_spi_dma.h
.\objects\system_xinc.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_uart_dma.h

Some files were not shown because too many files have changed in this diff Show More