66 Commits

Author SHA1 Message Date
wuqi cbb03c9d9c 清理在线发布文件并恢复PWM32EPRO型号 2026-08-03 14:20:14 +08:00
wuqi 5e921a1546 恢复433接收引脚为GPIO5 2026-08-03 13:23:27 +08:00
wuqi f71c3f4124 添加DWM22量产固件和黑盒测试文档 2026-08-03 12:46:54 +08:00
wuqi ee68f37f04 DWM22量产测试 2026-07-29 18:33:18 +08:00
wuqi 99d4844c01 DWM22测试板 2026-07-29 17:37:05 +08:00
wuqi 6d114add28 更改成固定窗口解码模块 2026-07-29 13:48:23 +08:00
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
207 changed files with 23160 additions and 17475 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
@@ -0,0 +1,779 @@
# 1224V 2P2N双色LED H桥驱动原理与器件设计
## 1. 文档目的
本文针对一套输入电压为12~24V的双色LED H桥驱动电路。主功率桥由2只PMOS和2只NMOS组成,另外使用2只小信号NMOS驱动高边PMOS,因此整个驱动部分共使用6只MOS管。
本文说明:
- 2P2N主桥和2只驱动MOS分别承担什么工作;
- 双色LED为什么需要H桥改变电流方向;
- 两路PWM输入怎样控制暖光、冷光和关闭状态;
- 为什么两路输入绝对不能同时为高电平;
- 为什么换向必须先输出`00`并保留死区;
- PMOS为什么需要栅极上拉电阻和下拉电阻;
- 两个电阻为什么会形成分压;
- 电阻太大或太小分别会产生什么问题;
- 12V稳压管在电路中起什么作用;
- 如何计算PMOS的栅源电压、电阻功耗和稳压管电流;
- 如果取消稳压管,应当如何重新选择电阻;
- 为什么还必须检查死区时间、MOS管尖峰和PCB布局。
本文尽量使用直观的方式说明,适合刚接触MOS管驱动电路的工程人员阅读。
---
## 2. 完整电路由哪些部分组成
![1224V 2P2N双色LED H桥驱动原理图](images/12-24V_2P2N_H桥驱动原理图.png)
图1:本项目12~24V、2P2N主桥加2只小MOS驱动的完整原理图。
图中的主要器件分工如下:
| 器件 | 类型 | 作用 |
|---|---|---|
| Q1、Q2 | 高边PMOS60P03 | 分别把C端、W端连接到12~24V电源 |
| Q9、Q10 | 低边NMOS60N03 | 分别把C端、W端连接到GND |
| Q7、Q8 | 小信号NMOSAO3400A | 分别下拉Q1、Q2的栅极 |
| R1、R2 | 2.4kΩ上拉电阻 | 使Q1、Q2快速关断 |
| R3、R4 | 3kΩ下拉通路电阻 | 与R1、R2分压,限制高边PMOS的导通VGS |
| D1、D2 | 12V稳压管(BZT52C12 | 限制高边PMOS的栅源电压尖峰 |
| R14、R15 | 10kΩ栅源下拉电阻 | 确保Q9、Q10在控制信号悬空时保持关闭 |
### 2.1 2只高边PMOS
高边使用2只PMOS
- 左侧PMOS负责把输出端`C`连接到1224V电源;
- 右侧PMOS负责把输出端`W`连接到1224V电源。
PMOS适合放在高边,是因为它的源极可以直接接正电源,栅极只需要从源极电压向下拉,就能导通。
### 2.2 2只低边NMOS
低边使用2只NMOS
- 左侧NMOS负责把输出端`C`连接到GND
- 右侧NMOS负责把输出端`W`连接到GND。
低边NMOS的源极接地,MCU输出高电平后比较容易直接驱动其栅极。
### 2.3 2只PMOS驱动NMOS
MCU通常只有3.3V输出,不能直接把接在12~24V电源上的PMOS栅极拉到合适电位,所以增加2只小信号NMOS:
- 左侧驱动NMOS负责下拉左侧PMOS栅极;
- 右侧驱动NMOS负责下拉右侧PMOS栅极。
这2只小MOS不直接承受LED主电流,只负责PMOS栅极的充电和放电控制。
### 2.4 负载是反向并联双色LED
双色LED连接在`C``W`两个H桥输出端之间。两种颜色的LED芯片方向相反:
- 电流从`C`流向`W`时,点亮一种颜色;
- 电流从`W`流向`C`时,点亮另一种颜色;
- 两个方向快速分时工作时,肉眼看到混合色或中性光。
H桥的作用不是简单提供两路独立正电压,而是改变流过双色LED的电流方向。
---
## 3. 两路输入如何控制H桥
本文把两路控制信号称为:
- `PWM_W`:驱动Q7和对角线上的Q10,形成`C→W`电流;
- `PWM_C`:驱动Q8和对角线上的Q9,形成`W→C`电流。
按照当前交叉驱动结构,一路信号会同时控制一只高边PMOS和对角线上的一只低边NMOS。
> `PWM_C`、`PWM_W`是电路网络名称。最终点亮暖色还是冷色,还取决于双色LED的实际安装方向。
### 3.1 PWM_W有效
`PWM_W=1、PWM_C=0`时:
- Q7导通并下拉Q1的栅极,使左侧高边PMOS Q1导通;
- 对角线上的右侧低边NMOS Q10导通;
- `C`端接近电源;
- `W`端接近GND
- 电流方向为`电源 → C → LED → W → GND`
此时点亮一个颜色。
### 3.2 PWM_C有效
`PWM_C=1、PWM_W=0`时:
- Q8导通并下拉Q2的栅极,使右侧高边PMOS Q2导通;
- 对角线上的左侧低边NMOS Q9导通;
- `W`端接近电源;
- `C`端接近GND
- 电流方向为`电源 → W → LED → C → GND`
此时点亮另一个颜色。
### 3.3 两路均为低电平
`PWM_C=0、PWM_W=0`时:
- 两只高边PMOS关闭;
- 两只低边NMOS关闭;
- H桥处于关闭状态;
- LED没有持续驱动电流。
换向时必须先进入这个状态。
### 3.4 两路均为高电平
`PWM_C=1、PWM_W=1`是禁止状态。
此时两组对角桥臂同时收到导通命令,可能导致同一桥臂的上管和下管同时导通,形成:
```text
电源 → 上管 → 下管 → GND
```
这条路径几乎没有LED负载限流,会产生很大的直通电流,可能造成:
- 电源异响;
- MOS管快速发热;
- 电源电压跌落;
- MCU复位或蓝牙掉线;
- MOS管损坏;
- PCB走线或电源器件损坏。
控制真值表如下:
| PWM_C | PWM_W | H桥状态 | 结果 |
|---:|---:|---|---|
| 0 | 0 | 全部关闭 | 安全关闭/换向死区 |
| 0 | 1 | C高、W低 | 电流从C流向W |
| 1 | 0 | W高、C低 | 电流从W流向C |
| 1 | 1 | 禁止状态 | 可能发生桥臂直通 |
---
## 4. 为什么换向必须设置死区
MOS管不是收到控制电平后立即完成导通或关断。栅极电容、米勒平台、驱动电阻和PCB寄生参数都会产生延迟。
如果直接执行:
```text
PWM_C有效 → PWM_W有效
```
可能出现:
- 原方向的PMOS和NMOS还没有完全关闭;
- 新方向的PMOS和NMOS已经开始导通;
- 两个方向在很短时间内重叠;
- H桥形成瞬间直通。
正确换向顺序应为:
```text
方向C导通 → 输出00 → 等待死区 → 方向W导通
方向W导通 → 输出00 → 等待死区 → 方向C导通
```
死区时间不能只根据软件定时值决定,必须结合实际MOS管栅极波形测量。对于本类低频LED PWM,可以先设置较保守的死区进行验证,再根据示波器结果缩短。
需要注意:
- 死区太短,可能发生直通;
- 死区太长,会降低最大有效占空比和LED峰值亮度;
- 调高PWM频率后,相同死区占整个周期的比例会变大;
- PMOS上拉电阻变大后,通常需要重新确认死区是否足够。
---
## 5. 先认识PMOS的三个引脚
PMOS有三个主要引脚:
- `S`:源极(Source),本电路接12V或24V电源;
- `G`:栅极(Gate),用于控制PMOS导通和关断;
- `D`:漏极(Drain),连接H桥输出端。
PMOS是否导通,主要取决于栅源电压:
```text
VGS = VG - VS
```
其中:
- `VG`是栅极对地电压;
- `VS`是源极对地电压。
假设源极接24V
| 栅极电压VG | 栅源电压VGS | PMOS状态 |
|---:|---:|---|
| 24V | 0V | 关断 |
| 20V | -4V | 开始较明显导通 |
| 14V | -10V | 充分导通 |
| 12V | -12V | 充分导通 |
| 0V | -24V | 超过多数PMOS的栅源耐压,危险 |
> 注意:数据手册中的`VGS(th)`是“刚开始有很小电流”的开启阈值,不代表MOS管已经充分导通。
以SL60P03D为例:
- `VGS(th)`约为-1.0V至-2.2V
- 导通电阻通常在`VGS=-4.5V``VGS=-10V`条件下标定;
- 栅源极绝对最大耐压为`±20V`
所以“20V”不是开启阈值,而是不能超过的栅源极极限耐压。
---
## 6. 上拉电阻和下拉电阻分别做什么
为避免受到原理图位号差异影响,本文统一使用下面的名称:
- `RUP`:PMOS栅极到源极(电源)的上拉电阻;
- `RDOWN`PMOS栅极到地的下拉电阻;
- `DZ`:跨接在PMOS栅极和源极之间的稳压管;
- `QDRV`:把PMOS栅极向地拉低的小信号MOS管。
简化结构如下:
```text
电源12V/24V
|
+--------- PMOS源极S
|
RUP
|
+--------- PMOS栅极G
|
RDOWN
|
QDRV
|
GND
DZ稳压管跨接在PMOS的S和G之间。
```
### 6.1 PMOS关断过程
`QDRV`关闭后,下拉路径断开,`RUP`把PMOS栅极充电到源极电压:
```text
VG ≈ VS
VGS ≈ 0V
```
PMOS关断。
因此,`RUP`越小,给栅极电容充电的电流越大,PMOS通常关断得越快。
### 6.2 PMOS导通过程
`QDRV`导通后,`RUP``RDOWN`形成从电源到地的分压回路,栅极电压下降,PMOS得到负的`VGS`并导通。
因此:
- `RUP`太小:关断快,但栅极不容易被拉低,PMOS导通电压可能不足;
- `RUP`太大:PMOS容易得到较大的负`VGS`,但栅极充电慢,关断时间增加;
- `RDOWN`太小:PMOS导通更充分,但电流和电阻功耗增加;
- `RDOWN`太大:功耗降低,但PMOS导通电压减小。
两个电阻必须综合考虑,不能只追求其中一个方向。
---
## 7. 没有稳压管时如何计算
先忽略稳压管,假设`QDRV`已经完全导通。
栅极电压为:
```text
VG = VCC × RDOWN / (RUP + RDOWN)
```
PMOS栅源电压的绝对值为:
```text
|VGS| = VCC × RUP / (RUP + RDOWN)
```
回路电流为:
```text
I = VCC / (RUP + RDOWN)
```
两个电阻的功耗分别为:
```text
PUP = I² × RUP
PDOWN = I² × RDOWN
```
### 7.1 当前原理图:24V、上拉2.4kΩ、下拉3kΩ
```text
VCC = 24V
RUP = 2.4kΩ
RDOWN = 3kΩ
```
计算结果:
```text
VG = 24 × 3 / (2.4 + 3) ≈ 13.33V
VGS = 13.33 - 24 ≈ -10.67V
I = 24 / 5.4k ≈ 4.44mA
PUP = I² × 2.4k ≈ 47mW
PDOWN = I² × 3k ≈ 59mW
```
所以栅极并不会被拉到0V,而是被两个电阻分压到约13.33V。
PMOS得到约-10.67V的栅源电压,能够充分导通。这个数值没有达到12V稳压管的击穿电压,因此D1/D2在稳定导通状态下基本不工作,主要用于处理换向尖峰。
### 7.2 当前原理图:12V、上拉2.4kΩ、下拉3kΩ
同样的电阻在12V输入下:
```text
VG = 12 × 3 / (2.4 + 3) ≈ 6.67V
VGS = 6.67 - 12 ≈ -5.33V
I = 12 / 5.4k ≈ 2.22mA
PUP ≈ 12mW
PDOWN ≈ 15mW
```
此时PMOS仍然可以可靠导通,而且12V稳压管在正常稳定状态下不会反向击穿。
---
## 8. 稳压管的真正作用
12V稳压管跨接在PMOS的源极和栅极之间,主要作用是限制`|VGS|`
### 8.1 正常关断时
PMOS栅极被`RUP`拉到源极电压:
```text
VGS ≈ 0V
```
稳压管不工作。
### 8.2 正常导通时
栅极被下拉,`|VGS|`逐渐增大。
`|VGS|`接近稳压管的击穿电压后,稳压管开始反向导通,把`|VGS|`限制在大约12V附近。
24V输入、12V稳压管钳位时,理想状态约为:
```text
VS ≈ 24V
VG ≈ 12V
VGS ≈ -12V
```
### 8.3 换向尖峰出现时
H桥换向会受到以下因素影响:
- MOS管栅极电容;
- 米勒电容;
- PCB走线电感;
- LED和供电线路电感;
- MOS管体二极管反向恢复;
- 电源母线尖峰。
这些因素可能让`VGS`在很短时间内超过正常分压值。稳压管可以吸收部分栅源尖峰,避免PMOS栅极氧化层承受过高电压。
### 8.4 正向栅源尖峰
如果换向时栅极瞬间高于源极,稳压管会像普通二极管一样正向导通,把正向`VGS`限制在约0.7V至1V附近。
### 8.5 稳压管不能保护什么
栅源稳压管只能保护PMOS的`VGS`,不能保护PMOS的漏源极`VDS`
例如:
- 电源为24V
- PMOS的`VDS`额定值为-30V。
这时漏源极只有约6V的理论尖峰余量。电源母线仍需考虑:
- TVS管;
- 就近低ESR电容;
- 较短、较宽的功率走线;
- 减小H桥电流环路面积;
- 必要时使用耐压更高的MOS管。
---
## 9. 为什么稳压管不是接上就一定能稳定在12V
稳压管必须获得足够的反向电流,才能进入比较稳定的击穿区。
为了说明稳压管为什么需要足够电流,下面使用“上拉1.2kΩ、下拉1kΩ”作为对比算例。这不是图1当前采用的2.4kΩ、3kΩ参数。
假设:
```text
VCC = 24V
VZ = 12V
RUP = 1.2kΩ
RDOWN = 1kΩ
```
钳位后栅极约为12V。
下拉电阻电流:
```text
IDOWN = 12V / 1kΩ = 12mA
```
上拉电阻电流:
```text
IUP = (24V - 12V) / 1.2kΩ = 10mA
```
稳压管电流约为:
```text
IZ = IDOWN - IUP = 12mA - 10mA = 2mA
```
因此,1.2kΩ上拉加1kΩ下拉时,稳压管大约只有2mA电流。
这通常可以产生一定的钳位作用,但实际电压未必正好是12.00V。稳压管的标称电压、测试电流、动态电阻和温度特性需要查看具体厂家的数据手册。
如果上拉和下拉都是1kΩ:
```text
IUP = 12mA
IDOWN = 12mA
IZ ≈ 0mA
```
此时稳压管几乎没有剩余电流,不能指望它进入稳定的反向击穿状态。
对于图1当前的2.4kΩ上拉和3kΩ下拉,在24V正常导通时,计算得到`|VGS|≈10.67V`,低于12V,因此稳压管不会持续击穿。这正是更合适的状态:正常工作由电阻分压确定栅极电压,稳压管只处理异常瞬态。
---
## 10. 为什么电阻不能只考虑关断速度
MOS管的栅极不是普通的纯电阻负载,可以把它理解为一个需要充电和放电的电容。
SL60P03D的典型参数包括:
- 输入电容`CISS`约为1988pF
- 总栅极电荷`Qg`约为35nC(特定测试条件下);
- 米勒电荷`Qgd`约为8.8nC。
PMOS关断时,`RUP`负责给栅极充电。可以先用RC时间常数粗略估算:
```text
τ ≈ RUP × CISS
```
例如:
| RUP | 估算时间常数τ |
|---:|---:|
| 1.2kΩ | 约2.4μs |
| 2.2kΩ | 约4.4μs |
| 2.4kΩ | 约4.8μs |
| 3.6kΩ | 约7.2μs |
实际关断时间还受到栅极电荷、米勒平台、漏极电压变化和PCB寄生参数影响,不能只用一个RC公式定论。
### 10.1 RUP太大
可能产生:
- PMOS关断变慢;
- 换向时上管尚未完全关断,下管已经开启;
- H桥上下管短暂直通;
- 电源出现大电流尖峰;
- MOS管异常发热;
- 电路发出异响;
- 严重时损坏MOS管或电源。
### 10.2 RUP太小
可能产生:
- PMOS关断速度加快;
- 但下拉时大量电流被RUP分走;
- 栅极下拉不够,PMOS的负`VGS`不足;
- PMOS没有充分导通,导通电阻增大;
- 驱动回路静态功耗增加;
- 电阻和驱动管温升增加。
所以“上拉电阻越小越安全”并不成立。
---
## 11. 电阻功耗不能只按照死区时间计算
这是非常容易出现的误区。
死区时间,例如25μs或50μs,表示换向时两边都关闭的保护时间。它不代表上拉、下拉电阻只通电25μs或50μs。
当PMOS保持导通时:
- `QDRV`持续导通;
- `RUP``RDOWN`和稳压管可能持续有电流;
- 电阻功耗会持续整个PMOS导通阶段。
因此必须分别检查:
1. 正常导通期间的连续或平均功耗;
2. 换向尖峰期间的瞬时脉冲功耗。
### 11.1 对比算例:24V钳位在12V、RUP=1.2kΩ、RDOWN=1kΩ
钳位时:
```text
PUP = 12² / 1.2k ≈ 120mW
PDOWN = 12² / 1k ≈ 144mW
PZ = 12V × 2mA ≈ 24mW
```
普通0603电阻常见连续额定功率约为0.1W,但不同厂家、环境温度和PCB焊盘条件会有差异。
因此:
- 120mW和144mW不能简单地当成“只有50μs”;
- 如果PMOS长时间保持导通,电阻可能接近连续承受该功耗;
- 建议使用0805封装,或使用多个电阻分担功耗;
- 最终必须查看所选电阻的数据手册和降额曲线。
图1当前采用2.4kΩ上拉和3kΩ下拉,24V稳定工作时功耗分别约为47mW和59mW,不会出现上述持续钳位功耗;但0603电阻仍应考虑环境温度和功率降额。
---
## 12. 取消稳压管时如何选择电阻
如果决定不安装稳压管,就必须完全依靠电阻分压限制`VGS`
设计时应检查最坏情况:
```text
|VGS|max = VCC,max × RUP,max / (RUP,max + RDOWN,min)
```
必须同时考虑:
- 电源最高电压;
- 电源启动和负载突卸尖峰;
- 电阻误差;
- 温度;
- 驱动管导通压降;
- PCB寄生参数。
### 12.1 同时兼容12V和24V的参考值
可以考虑:
```text
RUP = 2.4kΩ
RDOWN = 3kΩ
```
计算结果:
| 输入电压 | 栅源电压VGS | 回路电流 |
|---:|---:|---:|
| 12V | 约-5.33V | 约2.22mA |
| 24V | 约-10.67V | 约4.44mA |
24V时电阻功耗:
```text
PUP ≈ 47mW
PDOWN ≈ 59mW
```
这个组合具有以下特点:
- 12V输入时仍能获得约-5.33V驱动;
- 24V输入时约为-10.67V
- 正常功耗低于1.2kΩ加1kΩ方案;
- 2.4kΩ上拉的关断速度仍然较快;
- 不需要依靠稳压管在正常工作时持续击穿。
即使使用这个分压,保留稳压管仍然有价值:它在正常工作时不导通,只在异常尖峰时保护PMOS。
---
## 13. 两种方案对比
### 方案A:电阻分压加稳压管
优点:
- 对栅源尖峰有额外保护;
- 元件误差或异常状态下更安全;
- 可以限制`VGS`不超过约12V。
缺点:
- 必须保证稳压管具有合适的工作电流;
- 如果设计成稳压管持续击穿,会增加静态功耗;
- 电阻功耗和稳压管功耗都需要核算。
适合:
- 24V供电;
- H桥换向尖峰明显;
- 对可靠性要求较高;
- PCB空间允许增加保护器件。
### 方案B:只使用电阻分压
优点:
- 元件少;
- 不存在稳压管持续工作产生的额外功耗;
- 参数计算直观。
缺点:
- 失去栅源尖峰钳位;
- 对电源波动、电阻误差和PCB寄生参数更敏感;
- 上拉电阻开路等故障可能让`VGS`超过额定值。
适合:
- 输入电压范围明确;
- 电源尖峰受到良好控制;
- 已经通过示波器确认`VGS`安全;
- 有足够的设计余量。
---
## 14. 本电路的建议
### 14.1 如果保留12V稳压管
建议:
- 不要只根据“关断越快越好”无限减小上拉电阻;
- 计算稳压管电流,确认能够形成有效钳位;
- 按整个PMOS导通时间核算电阻平均功耗;
- 对超过或接近0.1W的电阻优先使用0805;
- 用示波器测量真实`VGS`,确认导通时约为-10V至-12V,关断时回到0V。
### 14.2 如果取消稳压管
12V至24V输入可以先测试:
```text
RUP = 2.4kΩ
RDOWN = 3kΩ
```
但必须满足:
- 实测最大负`VGS`有足够余量;
- 实测正向和反向尖峰没有接近`±20V`
- 电源母线已经做好TVS和就近电容;
- PMOS能在下管开启前完全关断;
- 保留足够的硬件或软件死区。
### 14.3 关于死区
死区的最终取值不能仅凭计算,应根据示波器实测决定。
至少同时测量:
- 上管PMOS的`VGS`
- 下管NMOS的`VGS`
- H桥输出节点;
- 24V母线电压;
- 条件允许时测量桥臂电流。
判断标准是:
> 下管开始导通之前,对应上管必须已经退出导通区,并且换向过程中没有异常母线电流尖峰。
---
## 15. 初学者常见误区
### 误区一:PMOS的20V是开启阈值
错误。20V通常是栅源极最大耐压。真正的`VGS(th)`一般只有约1V至3V,但这个电压只能让MOS管刚刚开始导通。
### 误区二:栅极下拉后一定是0V
错误。如果存在上拉和下拉电阻,栅极由两个电阻分压,不会自然等于0V。
### 误区三:装了12V稳压管,VGS就一定是-12V
错误。稳压管必须获得足够的反向电流,实际钳位电压还受到电流、温度和器件误差影响。
### 误区四:上拉电阻越小,电路越安全
错误。上拉电阻减小会加快关断,但也会降低PMOS导通时的负`VGS`,并增加静态功耗。
### 误区五:电阻的高功耗只持续死区时间
错误。PMOS导通期间,分压回路可能持续有电流。必须按照实际占空比和最坏工作状态核算平均功耗。
### 误区六:栅源稳压管可以保护整个MOS管
错误。它主要保护`VGS`,不能代替24V母线TVS,也不能阻止`VDS`超过MOS管额定值。
---
## 16. 最终检查清单
原理图确定后,至少完成以下检查:
- [ ] 确认PMOS的`VGS(th)`、推荐驱动电压和`VGS(max)`
- [ ] 计算12V和24V下的正常`VGS`
- [ ] 计算最高电源电压和电阻误差下的最坏`VGS`
- [ ] 计算上拉、下拉电阻连续功耗;
- [ ] 计算稳压管正常电流和功耗;
- [ ] 检查0603/0805电阻的额定功率和降额曲线;
- [ ] 测量PMOS栅极对源极波形,而不是只测栅极对地;
- [ ] 检查换向时是否有正向或反向`VGS`尖峰;
- [ ] 检查上下管是否发生交叉导通;
- [ ] 验证`PWM_C=1、PWM_W=1`在软硬件中都不会出现;
- [ ] 验证每次方向切换都经过`00`关闭状态;
- [ ] 检查24V母线是否超过PMOS的`VDS`额定值;
- [ ] 高温、低温、最低输入和最高输入条件下重复测试。
---
## 17. 总结
PMOS栅极驱动电阻的选择,本质上是在以下四项之间寻找平衡:
1. PMOS必须得到足够的负`VGS`,保证充分导通;
2. PMOS必须快速回到`VGS≈0V`,保证及时关断;
3. 分压回路的电流和电阻功耗不能过大;
4. 栅源电压和换向尖峰不能超过MOS管额定值。
稳压管的核心作用是保护PMOS栅源极,而不是替代电阻分压,也不是控制死区。合理的设计应先用电阻比例确定正常工作点,再用稳压管处理异常和瞬态过压,最后通过示波器实测确认。
对于这套12~24V、2P2N主桥加2只驱动MOS的双色LED电路,还必须始终遵守两个基本原则:
1. `PWM_C``PWM_W`不能同时为高电平;
2. 两个电流方向切换时,必须先输出`00`,等待确认安全的死区后再开启另一方向。
+203
View File
@@ -0,0 +1,203 @@
# DWM22 黑盒用户测试文档
## 1. 文档信息
| 项目 | 内容 |
| --- | --- |
| 产品名称 | DWM22 |
| 测试类型 | 用户黑盒功能测试 |
| 固件校验码 | `0F9DA5A0` |
| 固件提交 | `ee68f37 DWM22量产测试` |
| APP | Ultra Life |
| 测试日期 | |
| 测试人员 | |
| 样机编号 | |
> 测试人员只根据实际操作和灯光表现判断结果,不需要查看程序、波形或内部数据。
## 2. 测试准备
- DWM22 测试样机 1 台。
- 双色 LED 灯板及 12~24V 配套电源。
- 安装最新版 Ultra Life APP 的手机 1 台。
- 433 遥控器至少 2 个;测试 5 路记忆时准备 6 个。
- 遥控距离测试场地:无遮挡、直线距离大于 12 米。
- 每个用例测试完成后,在“结果”栏填写:通过或失败。
## 3. 产品模式说明
DWM22 共 14 个产品模式,固定顺序如下:
**暖光静态 → 冷光静态 → 中性光静态 → 暖光呼吸 → 冷光呼吸 → 中性光呼吸 → 三色呼吸 → 暖冷连续渐变 → 暖冷中性渐变 → 暖光闪烁 → 冷光闪烁 → 中性光闪烁 → 暖冷中性跳变 → 三色闪烁**
- 模式 1~3 为静态模式,可以调节亮度。
- 模式 4~14 为动态模式,可以调节亮度和速度。
- 遥控器“模式+”按上述顺序向后切换,“模式-”按相反顺序返回。
- 到达模式 14 后继续按“模式+”,应停留在模式 14,不从头循环。
- 到达模式 1 后继续按“模式-”,应停留在模式 1,不跳到模式 14。
- APP 色温环属于自定义静态色温,不占用以上 14 个模式编号。
| 顺序 | 模式名称 | 产品效果说明 |
| --- | --- | --- |
| 1 | 暖光静态 | 仅暖光常亮 |
| 2 | 冷光静态 | 仅冷光常亮 |
| 3 | 中性光静态 | 暖光和冷光混合形成中性光 |
| 4 | 暖光呼吸 | 暖光由暗到亮、再由亮到暗循环 |
| 5 | 冷光呼吸 | 冷光由暗到亮、再由亮到暗循环 |
| 6 | 中性光呼吸 | 暖冷两路保持中性比例同步呼吸 |
| 7 | 三色呼吸 | 暖光、冷光、中性光依次完成呼吸 |
| 8 | 暖冷连续渐变 | 暖光与冷光互补变化,一个降低时另一个升高,全程不断光 |
| 9 | 暖冷中性渐变 | 在暖光、冷光和中性光之间平滑渐变,颜色衔接时保持亮光 |
| 10 | 暖光闪烁 | 暖光按设定速度亮灭 |
| 11 | 冷光闪烁 | 冷光按设定速度亮灭 |
| 12 | 中性光闪烁 | 中性光按设定速度亮灭 |
| 13 | 暖冷中性跳变 | 暖光、冷光、中性光直接切换,不做渐变 |
| 14 | 三色闪烁 | 暖光、冷光、中性光依次闪烁,中间包含熄灭节拍 |
## 4. 基本功能
| 编号 | 测试操作 | 预期结果 | 结果 | 备注 |
| --- | --- | --- | --- | --- |
| 01 | 接通电源 | 灯具能在正常时间内点亮;无长时间不亮、异常闪烁、异响或发热 | | |
| 02 | 使用遥控器或 APP 开灯、关灯 | 开关响应正确,开关过程柔和;关灯后两路 LED 均完全熄灭 | | |
| 03 | 连续开关灯 10 次 | 每次均正常响应,无死机、失控或蓝牙广播消失 | | |
| 04 | 在暖光、冷光、中性光之间反复切换 | 颜色正确,过渡柔和,无突然增亮、突然变暗或异常颜色闪现 | | |
| 05 | 从最低亮度逐级调到最高亮度,再调回最低亮度 | 亮度变化连续、均匀,无明显顿挫、抖动或提前熄灭 | | |
| 06 | 中性光在低亮度下持续观察 30 秒 | 无肉眼可见抖动,两路混色比例稳定 | | |
## 5. 遥控器对码
对码操作:连接 DWM22,在 APP“更多”页面点击“遥控器对码”,在 5 秒倒计时内长按遥控器“亮度+”按键。
| 编号 | 测试操作 | 预期结果 | 结果 | 备注 |
| --- | --- | --- | --- | --- |
| 07 | 使用未对码遥控器直接控制灯具 | 灯具不响应 | | |
| 08 | 在 APP 中进入“遥控器对码”,长按遥控器“亮度+” | 灯具给出对码闪烁反馈;APP 显示“对码成功”和已对码数量 | | |
| 09 | 对码成功后测试遥控器开关、模式和亮度按键 | 所有按键均能正常控制灯具,短按一次即可响应 | | |
| 10 | 打开对码页面但不操作遥控器,等待 5 秒 | 对码自动结束,APP 提示未收到有效信号;原有遥控器不受影响 | | |
| 11 | 将已经对码的同一个遥控器再次对码 | 可以提示对码成功,但已对码数量不增加,不重复占用位置 | | |
| 12 | 依次对码 5 个不同遥控器 | 5 个遥控器都能控制灯具,APP 显示 `5/5` | | |
| 13 | 已有 5 个遥控器后,再对码第 6 个遥控器 | 第 6 个遥控器可以使用;最早对码的遥控器被替换,其余最近 4 个仍可使用 | | |
| 14 | 对码成功后切断电源,重新上电 | 已对码遥控器仍能使用,对码数据不会因断电丢失 | | |
## 6. 遥控器清码
| 编号 | 测试操作 | 预期结果 | 结果 | 备注 |
| --- | --- | --- | --- | --- |
| 15 | APP“更多”页面点击“清除遥控器” | 出现二次确认窗口,不会直接清码 | | |
| 16 | 在确认窗口点击“取消” | 遥控器数据保留,原遥控器仍可使用 | | |
| 17 | 再次进入清码并点击“清除” | 灯具给出清码反馈,APP 提示“清码成功”,已对码数量变为 0 | | |
| 18 | 清码后测试全部旧遥控器 | 所有旧遥控器均不能控制灯具 | | |
| 19 | 清码后重新对码一个遥控器 | 可以正常重新对码并控制灯具 | | |
| 20 | 清码后断电重启,再测试旧遥控器 | 清码结果被记忆,旧遥控器仍不能控制灯具 | | |
## 7. 遥控距离
| 编号 | 测试操作 | 预期结果 | 结果 | 备注 |
| --- | --- | --- | --- | --- |
| 21 | 在无遮挡环境下,将遥控器与灯具距离拉到 12 米以上 | 在大于 12 米的位置仍可正常控制,判定距离合格 | | 实测距离:____m |
| 22 | 在 12 米位置,分别短按开关、模式+、模式-、亮度+、亮度-各 10 次 | 按键能可靠响应,不能依赖连续按两次或刻意延长短按时间;建议每个按键至少 9 次一次响应 | | |
| 23 | 改变遥控器朝向,在 12 米位置重复测试 | 不应频繁失控;正常手持方向下可以稳定操作 | | |
## 8. 模式顺序测试
先在 APP 中选择模式 1,然后使用遥控器“模式+”按顺序测试到模式 14,每个模式至少观察 20 秒。之后使用“模式-”从模式 14 反向测试回模式 1。
| 编号 | 测试操作 | 预期结果 | 结果 | 备注 |
| --- | --- | --- | --- | --- |
| M01 | APP 依次点击模式 1~14 | 实际效果与 APP 模式名称一致,顺序正确 | | |
| M02 | 从模式 1 开始,遥控短按“模式+”13次 | 严格按照 1→2→…→14 切换,每次只前进一个模式 | | |
| M03 | 在模式 14 再按“模式+” | 保持模式 14,不循环回模式 1 | | |
| M04 | 从模式 14 开始,遥控短按“模式-”13次 | 严格按照 14→13→…→1 返回,每次只后退一个模式 | | |
| M05 | 在模式 1 再按“模式-” | 保持模式 1,不跳转到模式 14 | | |
| M06 | 对比 APP 选中模式、灯光效果和遥控切换结果 | 三者始终对应,不出现错位一个模式的情况 | | |
| 模式 | 效果 | 主要检查内容 | 结果 |
| --- | --- | --- | --- |
| 1 | 暖光静态 | 暖光正确,亮度稳定 | |
| 2 | 冷光静态 | 冷光正确,亮度稳定 | |
| 3 | 中性光静态 | 两路混色正确,无抖动 | |
| 4 | 暖光呼吸 | 从低到高、再从高到低,过程柔和 | |
| 5 | 冷光呼吸 | 从低到高、再从高到低,过程柔和 | |
| 6 | 中性光呼吸 | 呼吸时间与单色接近,低亮度无明显抖动,峰值亮度正常 | |
| 7 | 三色呼吸 | 暖、冷、中性依次呼吸;上一颜色降到最低后下一颜色平滑升起 | |
| 8 | 暖冷连续渐变 | 暖光降低时冷光同步升高,全程不断光、无突然跳变 | |
| 9 | 暖冷中性渐变 | 暖、冷、中性过渡自然;颜色交接时不突然变黑或异常增亮 | |
| 10 | 暖光闪烁 | 只出现暖光,节奏稳定 | |
| 11 | 冷光闪烁 | 只出现冷光,节奏稳定 | |
| 12 | 中性光闪烁 | 只出现中性光,两路比例稳定 | |
| 13 | 暖冷中性跳变 | 暖、冷、中性直接切换,颜色正确,无多余低亮度闪光 | |
| 14 | 三色闪烁 | 暖、冷、中性按设计闪烁,无错误颜色 | |
补充检查:
| 编号 | 测试操作 | 预期结果 | 结果 | 备注 |
| --- | --- | --- | --- | --- |
| 24 | 在模式 1~3 之间切换 | 使用柔和过渡,不出现最后突然亮一下的现象 | | |
| 25 | 从静态模式切换到模式 4~7 | 呼吸从低亮度开始,不会直接从最高亮度开始 | | |
| 26 | 切换到模式 10~14 | 直接进入正确动态效果,不出现其他颜色或多余低亮度脉冲 | | |
| 27 | 在动态模式下调节亮度 | 动态效果整体亮度可以调节,变化正确 | | |
| 28 | 在动态模式下调节速度 1~10 | 速度变化明显且方向正确;APP 显示值与实际效果一致 | | |
| 29 | 遥控器长按模式+或模式- | 按下时先执行一次,持续按住时约每 500ms 切换一次,不快速乱跳 | | |
## 9. 掉电记忆
### 9.1 全部带记忆
在 APP“更多 → 断电设置”中选择“全部带记忆”。
| 编号 | 测试操作 | 预期结果 | 结果 | 备注 |
| --- | --- | --- | --- | --- |
| 30 | 设置任意静态颜色、亮度,等待 2 秒后断电重启 | 恢复断电前的颜色和亮度 | | |
| 31 | 设置任意动态模式、亮度和速度,等待 2 秒后断电重启 | 恢复断电前的模式、亮度和速度 | | |
| 32 | 关灯后等待 2 秒,再切断电源并重新上电 | 恢复关灯状态,不应自行亮起 | | |
| 33 | 在中性光状态下改变亮度、模式或断电设置 | 保存过程中灯光不闪烁、不熄灭,蓝牙连接不中断 | | |
### 9.2 断电切换功能
在 APP“更多 → 断电设置”中选择“断电切换功能”。
| 编号 | 测试操作 | 预期结果 | 结果 | 备注 |
| --- | --- | --- | --- | --- |
| 34 | 设置一个容易识别的亮度,连续断电上电 4 次 | 每次上电依次为:暖光 → 冷光 → 中性光 → 暖光 | | |
| 35 | 检查每次上电后的亮度 | 三种静态颜色均保留之前设置的亮度 | | |
| 36 | 在任意动态模式或自定义色温下断电,再上电 | 仍按暖光、冷光、中性光的固定顺序轮换,不受断电前模式影响 | | |
| 37 | 选择断电切换功能后断电重启多次 | 该设置本身被记忆,不会自动恢复为“全部带记忆” | | |
| 38 | 在 APP 中来回切换两种断电设置 | 切换时灯光不闪烁、不突变,蓝牙连接保持正常 | | |
## 10. 蓝牙控制
| 编号 | 测试操作 | 预期结果 | 结果 | 备注 |
| --- | --- | --- | --- | --- |
| 39 | 打开 APP 搜索设备 | 能发现名称为 `DWM22` 的设备 | | |
| 40 | 连接 DWM22 | 可以正常进入 DWM22 控制界面,连接稳定 | | |
| 41 | APP 控制开灯和关灯 | 灯具正确响应,APP 状态与灯具一致 | | |
| 42 | APP 将亮度从 1 调到 100,再调回 1 | 灯光变化平滑,最低亮度可正常显示,无明显抖动或顿挫 | | |
| 43 | APP 拖动色温环,从暖光连续调到冷光并往返 | 色温连续变化,采用柔和过渡,无黑场、突变或错误颜色 | | |
| 44 | APP 依次选择 14 个模式 | 灯具效果与 APP 名称、图标和选中状态一致 | | |
| 45 | APP 调节动态亮度和速度 1~10 | 实际亮度和速度正确变化,界面数值正确 | | |
| 46 | 使用遥控器改变开关、模式、亮度或速度 | APP 已显示的设备状态能同步更新,不出现明显错乱 | | |
| 47 | 设置 APP 定时关机 | 到达设定时间后灯具自动关闭 | | |
| 48 | 蓝牙连接中关闭手机蓝牙或让设备断电 | APP 自动退出设备控制页,不停留在失效界面 | | |
| 49 | 恢复设备电源和手机蓝牙后重新连接 | 可以再次发现并连接,所有控制恢复正常 | | |
| 50 | 蓝牙连接状态下连续操作 5 分钟 | 无断链、无卡死、无控制延迟持续增大,灯光无异常抖动 | | |
## 11. 测试结论
| 项目 | 结论 |
| --- | --- |
| 对码功能 | □ 通过 □ 失败 |
| 清码功能 | □ 通过 □ 失败 |
| 遥控距离大于 12m | □ 通过 □ 失败 |
| 掉电记忆 | □ 通过 □ 失败 |
| 模式与灯光效果 | □ 通过 □ 失败 |
| 蓝牙控制 | □ 通过 □ 失败 |
| 整机测试结论 | □ 合格 □ 不合格 |
问题记录:
1.
2.
3.
测试人员签名:________________  日期:________________
Binary file not shown.

After

Width:  |  Height:  |  Size: 287 KiB

@@ -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")
+282 -203
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(){
deviceStatus=POWEROFF;
xc_gpio_write_pin(IO_PWM_W, GPIO_PIN_RESET);
xc_gpio_write_pin(IO_PWM_C, GPIO_PIN_RESET);
Light_Transition_RequestOff();
deviceStatus=POWEROFF;
}
@@ -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;
case 4:
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;
case 5:
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;
case 6:
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;
case 7:
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;
case 8:
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;
case 9:
W_PWM=100U; C_PWM=0U; driveMode=1U; direction=1U; Mode=mode2;
break;
case 10://圆环模式
Mode=mode0;
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;
}
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;
}
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; }
}
//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;
break;
case 2:
W_PWM = 0;
C_PWM = 0;
direction = 3;
driveMode=0;
break;
case 3:
W_PWM =40;
C_PWM =40;
direction = 4;
break;
case 4:
W_PWM =0;
C_PWM =0;
direction = 5;
driveMode=2;
break;
case 5:
W_PWM = 0;
C_PWM = 100;
direction = 6;
break;
case 6:
W_PWM = 0;
C_PWM = 0;
direction = 1;
driveMode=1;
break;
}
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 2U:
W_PWM=0U; C_PWM=100U; driveMode=2U; direction=3U;
break;
default:
W_PWM=50U; C_PWM=50U; driveMode=0U; direction=1U;
break;
}
UpdateDisplay_1();
}else if(choose_mode_falsg==13U){
switch(direction){
case 1U:
W_PWM=100U; C_PWM=0U; driveMode=1U; direction=2U;
break;
case 2U:
W_PWM=0U; C_PWM=0U; driveMode=2U; direction=3U;
break;
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;
}
}
}
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 //
@@ -188,7 +188,10 @@ void scan_433();
void Lock_Pwm7xd();
void Delay_50us();
void Encoder_key();
void rf433_clear_code(void);
uint8_t rf433_start_pairing(void);
void rf433_cancel_pairing(void);
uint8_t rf433_paired_count(void);
#endif
+480 -222
View File
@@ -4,7 +4,11 @@
#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"
#include "usr_server.h"
union rf433_flag rf_flag = {0};
unsigned char high_level_time;
unsigned char low_level_time;
@@ -75,105 +79,344 @@ void rf433_gpio_init(){
}
static uint8_t ssse=0;
uint8_t long_flag_s=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;
// 在固定大小数组中添加新元素(滑动窗口)
void addToFixedArray(uint8_t arr[], uint8_t newValue) {
uint8_t i;
// 所有元素向后移动一位
for( i = 4; i > 0; i--) {
arr[i] = arr[i - 1];
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;
static uint8_t app_pairing_requested;
#define PAIR_HOLD_FRAME_COUNT 4U
#define PAIR_FRAME_SILENCE_TICKS 100U
#define PAIRING_WINDOW_TICKS 50000UL
#define RF433_RELEASE_TIMEOUT_TICKS 1500U
#define RF433_MS_TO_SAMPLE_TICKS(ms) ((uint16_t)((ms) * (1000U / RF433_DECODER_SAMPLE_US)))
#define RF433_MODE_REPEAT_TICKS ((uint32_t)RF433_MS_TO_SAMPLE_TICKS(500U))
uint8_t long_flag_s=0;
static volatile uint32_t rf433_sample_ticks;
static uint32_t rf433_mode_last_action_tick;
static uint8_t rf433_mode_last_key;
static uint8_t rf433_mode_action_valid;
void _433_fun(void);
// 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 = 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;
}
uint8_t rf433_paired_count(void)
{
uint8_t count = 0U;
uint8_t i;
for(i = 0U; i < 5U; i++)
{
if(!Pairing_Address_IsEmpty(adress_H_array[i], adress_L_array[i]))
count++;
}
return count;
}
uint8_t rf433_start_pairing(void)
{
if(pairing_feedback_active)
{
ble_remote_event_notify(0x0DU, 0U, rf433_paired_count());
return 0U;
}
ssse = 0U;
time_5s = 1U;
pair_last_frame_sequence = rf_frame_sequence;
Pairing_Candidate_Reset();
app_pairing_requested = 1U;
ble_remote_event_notify(0x0DU, 1U, rf433_paired_count());
return 1U;
}
void rf433_cancel_pairing(void)
{
ssse = 1U;
time_5s = PAIRING_WINDOW_TICKS + 1U;
Pairing_Candidate_Reset();
if(app_pairing_requested)
{
app_pairing_requested = 0U;
ble_remote_event_notify(0x0DU, 0U, rf433_paired_count());
}
}
void rf433_clear_code(void)
{
uint8_t i;
for(i = 0U; i < 5U; i++)
{
adress_H_array[i] = 0xffU;
adress_L_array[i] = 0xffU;
}
adress = 0U;
adress_H = 0U;
adress_L = 0U;
match_success = 0U;
ssse = 1U;
time_5s = PAIRING_WINDOW_TICKS + 1U;
Pairing_Candidate_Reset();
Pairing_Feedback_Start(200U);
app_pairing_requested = 0U;
set_TaskComps_timer(2U, 2000U);
ble_remote_event_notify(0x0EU, 1U, 0U);
}
static void Encoder_key_NoCode(){
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){
long_press_cnt++;
if(app_pairing_requested &&
(ssse != 0U || time_5s > PAIRING_WINDOW_TICKS))
{
app_pairing_requested = 0U;
ble_remote_event_notify(0x0DU, 0U, rf433_paired_count());
}
if(long_press_cnt>200){
time_5s=40011;
ssse=1;
long_press_cnt=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(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);
}
}
}
}
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);
adress=receive_data >>8;
adress_H = (receive_data >> 16) & 0xff;
adress_L = (receive_data >> 8) & 0xff;
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;
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 +431,44 @@ 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);
if(app_pairing_requested)
{
app_pairing_requested = 0U;
if(res_data==Brightness_H ||
res_data==B_Brightness_H ||
res_data==F_Brightness_10)
ble_remote_event_notify(0x0DU, 2U,
rf433_paired_count());
else
ble_remote_event_notify(0x0EU, 1U, 0U);
}
}
}
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 +491,96 @@ static void set_click(){
}
}
void rf433_receive(void)//rf433接收,查询周期100us
static uint8_t rf433_is_mode_step_command(uint8_t command)
{
if (RF_DATA == LOW_LEVEL)
{
low_level_time++;//记录低电平时间
rf_flag.rf_receive_flag.current_level = 0; //当前电平状态
}
else if (RF_DATA == HIGH_LEVEL)
{
high_level_time++;//记录高电平时间
if (!rf_flag.rf_receive_flag.current_level)//每个上升沿检测,0→1,一个完整的周期检测
{
// 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;
}
}
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--;
}
}
else { //松手
time_300ms=LongPress_time;
long_time=0;
long_flag_s=0;
Key_TypeDef.KEY_STATE_Click=0;
KEY_STATE_re=0;
}
low_level_time = 0;//清零低电平时间
high_level_time = 1;//高电平时间开始计数
}
rf_flag.rf_receive_flag.current_level = 1;//当前电平状态
}
//
if(time_5s<=40000){
time_5s++;
}
return command == Mode_add || command == Mode_dow;
}
/*
* Act immediately on the first valid mode frame. Repeated frames carrying
* the same key are accepted at most once every 500 ms. Keep this independent
* from the generic 150 ms release detector so an occasional missing RF frame
* cannot turn one physical hold into several rapid short presses.
*/
static uint8_t rf433_mode_step_ready(uint8_t command)
{
uint32_t now = rf433_sample_ticks;
if(!rf433_mode_action_valid ||
rf433_mode_last_key != command ||
(uint32_t)(now - rf433_mode_last_action_tick) >=
RF433_MODE_REPEAT_TICKS)
{
rf433_mode_last_key = command;
rf433_mode_last_action_tick = now;
rf433_mode_action_valid = 1U;
return 1U;
}
return 0U;
}
void rf433_receive(void)//RF433 sample, called every 100 us
{
rf433_sample_ticks++;
rf433_decoder_sample((RF_DATA == HIGH_LEVEL) ? 1U : 0U);
if(long_time > 0U)
{
long_time--;
long_flag_s = 0U;
if(KEY_STATE_re == 1U)
{
if(time_300ms == 0U)
{
time_300ms = RF433_MS_TO_SAMPLE_TICKS(Short_time);
long_flag_s = 1U;
KEY_STATE_re = 0U;
}
else
{
time_300ms--;
}
}
}
else
{
time_300ms = RF433_MS_TO_SAMPLE_TICKS(LongPress_time);
long_flag_s = 0U;
Key_TypeDef.KEY_STATE_Click = 0U;
KEY_STATE_re = 0U;
}
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(Key_TypeDef.KEY_STATE_Click==1||KEY_STATE_re==1) return;
set_click();
sss=1;//记忆标志位
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(rf433_is_mode_step_command(res_data))
{
if(!rf433_mode_step_ready(res_data)) return;
}
else
{
if(Key_TypeDef.KEY_STATE_Click==1||KEY_STATE_re==1) return;
set_click();
}
switch(res_data){
//椭圆
case ON://单击
@@ -359,36 +595,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 +654,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);
}
@@ -432,4 +691,3 @@ void scan_433(){
@@ -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,8 @@
#include "pwm.h"
#include "mode.h"
#include "RF433.h"
#include "rf433_decoder.h"
#include "external_key.h"
#include "rgblight.h"
#include "timer.h"
#include "fmc_spi.h"
@@ -238,7 +240,6 @@ void board_init()
{
clock_init();
// app_uart_init();
rf433_gpio_init();
#if (_DEBUG_ == 1)
app_uart_init();
#endif
@@ -389,17 +390,20 @@ int main(void)
#endif
wdt_init();
/* Set the broadcast address of the device. */
board_init();
xc_fmc_spi_init_oprt( );
xc_fmc_spi_flash_wake_up();
fmc_spi_read();
power_restore_apply_on_boot();
/* Start the watchdog after the optional boot-time Flash update. */
wdt_init();
timer0_2_init();
bluetooth_init();
_PWM_INIT();
Bridge_Init();
// app_pwm_init();
@@ -448,6 +452,11 @@ int main(void)
#endif
// gpio_pullup_input_inter_test();
adc_Init();
external_key_init();
/* Keep RF433 GPIO initialization after the other input setup. */
rf433_gpio_init();
/* Clear any startup transition pulses after RF433 GPIO is stable. */
rf433_decoder_init();
while (1){
//DEBUG("222\r\n");
//printf("ddd=%d---%d---%d\r\n",W_PWM_duty,C_PWM_duty,(2*deadTime));
@@ -0,0 +1,598 @@
#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);
/*
* Use the same 450 us maximum energy as mixed light for every
* single-color output. Switching between the hardware-PWM and
* Timer3 mixed-light paths therefore does not change total energy.
*/
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.
*/
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);
}
@@ -0,0 +1,278 @@
#include "external_key.h"
#include "xc_drv_gpio.h"
#include "Mode.h"
#include "PWM.h"
#include "RF433.h"
#include "timer.h"
#include "timeslice.h"
#define EXTERNAL_KEY_PIN GPIO_5
#define EXTERNAL_KEY_PRESSED_LEVEL GPIO_PIN_RESET
/* external_key_scan is called every 10 ms. */
#define EXT_KEY_DEBOUNCE_TICKS 2U
#define EXT_KEY_DOUBLE_TICKS 15U
#define EXT_KEY_LONG_TICKS 40U
#define EXT_KEY_BRIGHTNESS_STEP_TICKS 5U
#define EXT_KEY_SPEED_STEP_TICKS 15U
#define EXT_KEY_CLEAR_CODE_TICKS 3000U
#define EXT_KEY_BRIGHTNESS_STEP 3U
#define EXT_KEY_SPEED_STEP 1U
#define EXT_KEY_SAVE_DELAY_MS 1000U
typedef enum
{
EXT_KEY_IDLE = 0,
EXT_KEY_DOWN,
EXT_KEY_WAIT_SECOND,
EXT_KEY_SECOND_DOWN,
EXT_KEY_LONG
} EXT_KEY_STATE;
static EXT_KEY_STATE ext_key_state = EXT_KEY_IDLE;
static uint16_t ext_key_press_ticks;
static uint16_t ext_key_wait_ticks;
static uint16_t ext_key_step_ticks;
static uint8_t ext_key_direction_up = 1U;
static uint8_t ext_key_adjust_speed;
static uint8_t ext_key_clear_triggered;
static uint8_t external_key_is_pressed(void)
{
return xc_gpio_read_pin(EXTERNAL_KEY_PIN) ==
EXTERNAL_KEY_PRESSED_LEVEL;
}
static void external_key_save_later(void)
{
set_TaskComps_timer(2U, EXT_KEY_SAVE_DELAY_MS);
}
static void external_key_power_toggle(void)
{
if(deviceStatus == POWEROFF)
Start_PWM();
else
Stop_PWM();
external_key_save_later();
}
static void external_key_mode_next(void)
{
if(deviceStatus == POWEROFF)
Start_PWM();
if(choose_mode_falsg >= EFFECT_MODE_MAX)
choose_mode_falsg = EFFECT_MODE_MIN;
else
choose_mode_falsg++;
choose_mode_bh = 0U;
startTimer(&timer1, 1U);
external_key_save_later();
}
static void external_key_brightness_step(void)
{
if(ext_key_direction_up)
{
if(Brightness >=
(BRIGHTNESS_MAX_PERCENT - EXT_KEY_BRIGHTNESS_STEP))
Brightness = BRIGHTNESS_MAX_PERCENT;
else
Brightness += EXT_KEY_BRIGHTNESS_STEP;
}
else
{
if(Brightness <=
(BRIGHTNESS_MIN_PERCENT + EXT_KEY_BRIGHTNESS_STEP))
Brightness = BRIGHTNESS_MIN_PERCENT;
else
Brightness -= EXT_KEY_BRIGHTNESS_STEP;
}
}
static void external_key_speed_step(void)
{
/*
* A smaller Speed value is faster in the current effect tables.
* Keep the same direction convention used by DWM11.
*/
if(ext_key_direction_up)
{
if(Speed > SPEED_MIN_LEVEL)
Speed -= EXT_KEY_SPEED_STEP;
}
else
{
if(Speed < SPEED_MAX_LEVEL)
Speed += EXT_KEY_SPEED_STEP;
}
}
static void external_key_adjust_step(void)
{
if(deviceStatus == POWEROFF)
Start_PWM();
if(ext_key_adjust_speed)
external_key_speed_step();
else
external_key_brightness_step();
}
static void external_key_long_start(void)
{
ext_key_adjust_speed = (Mode == mode0) ? 0U : 1U;
ext_key_step_ticks = 0U;
external_key_adjust_step();
}
static void external_key_long_stop(void)
{
if(ext_key_clear_triggered)
{
ext_key_clear_triggered = 0U;
ext_key_adjust_speed = 0U;
return;
}
external_key_save_later();
ext_key_direction_up = ext_key_direction_up ? 0U : 1U;
ext_key_adjust_speed = 0U;
}
void external_key_init(void)
{
GPIO_InitCfg_t gpio_cfg = {0};
gpio_cfg.Mux = GPIO_Mux0;
gpio_cfg.FunSel = GPIO_Dx;
gpio_cfg.Pull = GPIO_PULLUP;
gpio_cfg.Dir = GPIO_DIR_INPUT;
gpio_cfg.Int = NOT_INT;
gpio_cfg.Pin = EXTERNAL_KEY_PIN;
xc_gpio_init(&gpio_cfg);
}
void external_key_scan(void)
{
uint8_t pressed = external_key_is_pressed();
uint16_t step_period;
switch(ext_key_state)
{
case EXT_KEY_IDLE:
if(pressed)
{
ext_key_press_ticks = 1U;
ext_key_step_ticks = 0U;
ext_key_clear_triggered = 0U;
ext_key_state = EXT_KEY_DOWN;
}
break;
case EXT_KEY_DOWN:
if(pressed)
{
if(ext_key_press_ticks < 0xFFFFU)
ext_key_press_ticks++;
if(ext_key_press_ticks >= EXT_KEY_LONG_TICKS)
{
external_key_long_start();
ext_key_state = EXT_KEY_LONG;
}
}
else
{
if(ext_key_press_ticks >= EXT_KEY_DEBOUNCE_TICKS)
{
ext_key_wait_ticks = 0U;
ext_key_state = EXT_KEY_WAIT_SECOND;
}
else
{
ext_key_state = EXT_KEY_IDLE;
}
}
break;
case EXT_KEY_WAIT_SECOND:
if(pressed)
{
ext_key_press_ticks = 1U;
ext_key_step_ticks = 0U;
ext_key_clear_triggered = 0U;
ext_key_state = EXT_KEY_SECOND_DOWN;
}
else
{
ext_key_wait_ticks++;
if(ext_key_wait_ticks >= EXT_KEY_DOUBLE_TICKS)
{
external_key_power_toggle();
ext_key_state = EXT_KEY_IDLE;
}
}
break;
case EXT_KEY_SECOND_DOWN:
if(pressed)
{
if(ext_key_press_ticks < 0xFFFFU)
ext_key_press_ticks++;
if(ext_key_press_ticks >= EXT_KEY_LONG_TICKS)
{
external_key_long_start();
ext_key_state = EXT_KEY_LONG;
}
}
else
{
if(ext_key_press_ticks >= EXT_KEY_DEBOUNCE_TICKS)
external_key_mode_next();
ext_key_state = EXT_KEY_IDLE;
}
break;
case EXT_KEY_LONG:
if(pressed)
{
if(ext_key_press_ticks < 0xFFFFU)
ext_key_press_ticks++;
if(!ext_key_clear_triggered &&
ext_key_press_ticks >= EXT_KEY_CLEAR_CODE_TICKS)
{
ext_key_clear_triggered = 1U;
rf433_clear_code();
}
else if(!ext_key_clear_triggered)
{
step_period = ext_key_adjust_speed ?
EXT_KEY_SPEED_STEP_TICKS :
EXT_KEY_BRIGHTNESS_STEP_TICKS;
ext_key_step_ticks++;
if(ext_key_step_ticks >= step_period)
{
ext_key_step_ticks = 0U;
external_key_adjust_step();
}
}
}
else
{
external_key_long_stop();
ext_key_state = EXT_KEY_IDLE;
}
break;
default:
ext_key_state = EXT_KEY_IDLE;
break;
}
}
@@ -0,0 +1,7 @@
#ifndef _EXTERNAL_KEY_H_
#define _EXTERNAL_KEY_H_
void external_key_init(void);
void external_key_scan(void);
#endif
@@ -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,59 @@ 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);
/*
* Cycle-static is also a remembered state. Start PWM, BLE and the
* H-bridge through the same path as full-memory restore, then persist
* the next static mode through the normal deferred Flash state machine.
*/
set_TaskComps_timer(2U, POWER_POLICY_SAVE_DELAY_MS);
}
@@ -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,540 @@
#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 100U
#define CCT_RING_TRANSITION_TICKS 40U
#define TRANSITION_CURVE_LINEAR 0U
#define TRANSITION_CURVE_GAMMA_S 1U
#define TRANSITION_CURVE_GAMMA_OUT 2U
#define LIGHT_OUTPUT_SCALE 1000U
#define BREATH_MIN_OUTPUT (LIGHT_OUTPUT_SCALE / 100U)
#define DUAL_MIN_STABLE_CHANNEL_OUTPUT 102U
#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
};
/*
* Symmetric Gamma 1.8 transition curve:
* q = p^1.8 / (p^1.8 + (1-p)^1.8)
*
* Unlike applying Gamma independently to W and C, q and (1-q) remain
* complementary. The transition therefore eases in and out without causing
* a brightness dip in the middle. A table keeps the 5 ms task free of
* floating-point and power calculations.
*/
static const uint16_t transition_gamma_s_q12[101] = {
0U, 1U, 4U, 8U, 13U, 20U, 29U, 39U, 50U, 63U,
77U, 93U, 110U, 130U, 150U, 173U, 197U, 223U, 251U, 281U,
312U, 345U, 381U, 418U, 457U, 498U, 541U, 586U, 633U, 681U,
732U, 784U, 839U, 895U, 953U, 1012U, 1073U, 1136U, 1200U, 1265U,
1332U, 1400U, 1469U, 1539U, 1610U, 1682U, 1754U, 1827U, 1901U, 1974U,
2048U, 2122U, 2195U, 2269U, 2342U, 2414U, 2486U, 2557U, 2627U, 2696U,
2764U, 2831U, 2896U, 2960U, 3023U, 3084U, 3143U, 3201U, 3257U, 3312U,
3364U, 3415U, 3463U, 3510U, 3555U, 3598U, 3639U, 3678U, 3715U, 3751U,
3784U, 3815U, 3845U, 3873U, 3899U, 3923U, 3946U, 3966U, 3986U, 4003U,
4019U, 4033U, 4046U, 4057U, 4067U, 4076U, 4083U, 4088U, 4092U, 4095U,
4096U
};
static uint16_t current_brightness_q12;
static uint16_t power_fade_progress_q12;
static uint16_t power_fade_remainder;
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 uint8_t mode_transition_total_ticks;
static uint8_t mode_transition_gamma_curve;
static volatile uint8_t feedback_active;
static volatile uint8_t feedback_on;
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 transition_gamma_s_scale(uint8_t tick, uint8_t total_ticks)
{
uint16_t index;
if(total_ticks == 0U || tick >= total_ticks) return 4096U;
index = (uint16_t)(((uint16_t)tick * 100U +
(total_ticks / 2U)) / total_ticks);
if(index > 100U) index = 100U;
return transition_gamma_s_q12[index];
}
static uint16_t transition_gamma_out_scale(uint8_t tick, uint8_t total_ticks)
{
uint16_t index;
if(total_ticks == 0U || tick >= total_ticks) return 4096U;
index = (uint16_t)(((uint16_t)tick * 100U +
(total_ticks / 2U)) / total_ticks);
if(index > 100U) index = 100U;
return (uint16_t)(4096U - power_fade_gamma_q12[100U - index]);
}
static uint16_t interpolate_mode_output(uint16_t start, uint16_t target,
uint8_t tick)
{
uint32_t delta;
uint16_t progress_q12;
uint8_t total_ticks = mode_transition_total_ticks;
if(total_ticks == 0U || tick >= total_ticks) return target;
if(mode_transition_gamma_curve == TRANSITION_CURVE_GAMMA_S)
progress_q12 = transition_gamma_s_scale(tick, total_ticks);
else if(mode_transition_gamma_curve == TRANSITION_CURVE_GAMMA_OUT)
progress_q12 = transition_gamma_out_scale(tick, total_ticks);
else
progress_q12 = (uint16_t)(
((uint32_t)tick * 4096U + (total_ticks / 2U)) / total_ticks);
if(target >= start)
{
delta = (uint32_t)(target - start) * progress_q12;
return (uint16_t)(start +
((delta + 2048U) >> 12));
}
delta = (uint32_t)(start - target) * progress_q12;
return (uint16_t)(start -
((delta + 2048U) >> 12));
}
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;
mode_transition_total_ticks =
(choose_mode_falsg == CUSTOM_TEMPERATURE_MODE)
? CCT_RING_TRANSITION_TICKS : MODE_TRANSITION_TICKS;
if(Mode == mode0 && choose_mode_falsg <= 2U)
mode_transition_gamma_curve = TRANSITION_CURVE_GAMMA_S;
else if(Mode == mode0 &&
choose_mode_falsg == CUSTOM_TEMPERATURE_MODE)
mode_transition_gamma_curve = TRANSITION_CURVE_GAMMA_OUT;
else
mode_transition_gamma_curve = TRANSITION_CURVE_GAMMA_S;
Light_Transition_ModeActive = 1U;
}
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;
uint16_t color_progress_q12;
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. Map the color
* position through the same symmetric Gamma curve used by static
* transitions so the ends of each sweep are also eased.
*/
target_total = (uint16_t)(
((uint32_t)LIGHT_OUTPUT_SCALE * brightness_scale + 2048U) >> 12);
color_progress_q12 =
transition_gamma_s_q12[(C_PWM <= 100U) ? C_PWM : 100U];
target_c = (uint16_t)(
((uint32_t)target_total * color_progress_q12 + 2048U) >> 12);
if(target_c > target_total)
target_c = target_total;
target_w = target_total - target_c;
}
else if(Mode == mode1 ||
(Mode == mode3 && choose_mode_falsg == 8U))
{
/*
* Breathing and overlap-gradient amplitudes are perceptual light
* transitions, so both use the Gamma table instead of raw linear
* channel levels. Jump/flash modes remain outside this branch.
*/
target_w = (uint16_t)(
((uint32_t)effect_gamma_output(W_PWM) *
brightness_scale + 2048U) >> 12);
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_total_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);
GLOBAL_INT_DISABLE();
FMC_SPI_Flash_WritePage(op_flash.op_addr, op_flash.op_buff, 256);
GLOBAL_INT_RESTORE();
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,30 +125,40 @@ 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)
{
ble_flash_later_page_erase(0x1E000);
}
else if(op_flash.op_state == OP_IDEL &&app_op_flash_flag ==1)
{
ble_flash_later_write_page(app_data,0x1E000);
}
if(op_flash.op_state == OP_IDEL && app_op_flash_flag == 0U)
{
ble_flash_later_page_erase(USER_DATA_FLASH_ADDR);
}
else if(op_flash.op_state == OP_IDEL && app_op_flash_flag == 1U)
{
ble_flash_later_write_page(app_data, USER_DATA_FLASH_ADDR);
}
}
extern uint8_t aa;
@@ -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,179 @@
#include "rf433_decoder.h"
#include "rf433_decoder_port.h"
/*
* DWM11 fixed-width 24-bit RF433 decoder.
*
* The input is sampled every 100 us. A complete pulse pair is evaluated on
* each rising edge, exactly like the proven DWM11 implementation.
*/
#define RF433_SYNC_HIGH_MIN_EXCLUSIVE 1u
#define RF433_SYNC_HIGH_MAX_EXCLUSIVE 7u
#define RF433_SYNC_LOW_MIN_EXCLUSIVE 115u
#define RF433_SYNC_LOW_MAX_EXCLUSIVE 130u
#define RF433_ZERO_HIGH_MIN 1u
#define RF433_ZERO_HIGH_MAX 7u
#define RF433_ZERO_LOW_MIN 7u
#define RF433_ZERO_LOW_MAX 16u
#define RF433_ONE_HIGH_MIN 7u
#define RF433_ONE_HIGH_MAX 16u
#define RF433_ONE_LOW_MIN 2u
#define RF433_ONE_LOW_MAX 7u
#define RF433_BIT_LEN 24u
typedef struct
{
volatile uint16_t high_ticks;
volatile uint16_t low_ticks;
volatile uint8_t current_level;
volatile uint8_t sync_found;
volatile uint8_t bit_count;
volatile uint32_t data;
volatile uint8_t frame_ready;
Rf433DecoderFrame_t frame;
} Rf433Dwm11Decoder_t;
static Rf433Dwm11Decoder_t s_dec;
static void rf433_increment_saturated(volatile uint16_t *value)
{
if (*value < 0xffffu)
{
(*value)++;
}
}
static uint8_t rf433_in_range(uint16_t value, uint16_t min, uint16_t max)
{
return (value >= min && value <= max) ? 1u : 0u;
}
static uint8_t rf433_is_sync(uint16_t high, uint16_t low)
{
return (high > RF433_SYNC_HIGH_MIN_EXCLUSIVE &&
high < RF433_SYNC_HIGH_MAX_EXCLUSIVE &&
low > RF433_SYNC_LOW_MIN_EXCLUSIVE &&
low < RF433_SYNC_LOW_MAX_EXCLUSIVE) ? 1u : 0u;
}
static void rf433_publish_frame(uint32_t code)
{
s_dec.frame.code = code;
s_dec.frame.bit_len = RF433_BIT_LEN;
s_dec.frame.addr_h = (uint8_t)((code >> 16) & 0xffu);
s_dec.frame.addr_l = (uint8_t)((code >> 8) & 0xffu);
s_dec.frame.key = (uint8_t)(code & 0xffu);
s_dec.frame.score = 100u;
s_dec.frame_ready = 1u;
RF433_DECODER_LOG("[RF433 DWM11 OK] code=0x%06X key=0x%02X\r\n",
(unsigned int)code,
s_dec.frame.key);
}
static void rf433_decode_bit(uint8_t bit)
{
s_dec.data <<= 1;
if (bit != 0u)
{
s_dec.data |= 1u;
}
s_dec.bit_count++;
if (s_dec.bit_count >= RF433_BIT_LEN)
{
rf433_publish_frame(s_dec.data);
s_dec.sync_found = 0u;
s_dec.bit_count = 0u;
}
}
void rf433_decoder_init(void)
{
s_dec.high_ticks = 0u;
s_dec.low_ticks = 0u;
s_dec.current_level = 0u;
s_dec.sync_found = 0u;
s_dec.bit_count = 0u;
s_dec.data = 0u;
s_dec.frame_ready = 0u;
}
void rf433_decoder_sample(uint8_t level)
{
uint16_t high;
uint16_t low;
level = level ? 1u : 0u;
if (level == 0u)
{
rf433_increment_saturated(&s_dec.low_ticks);
s_dec.current_level = 0u;
return;
}
rf433_increment_saturated(&s_dec.high_ticks);
if (s_dec.current_level == 0u)
{
high = s_dec.high_ticks;
low = s_dec.low_ticks;
if (rf433_is_sync(high, low))
{
s_dec.sync_found = 1u;
s_dec.bit_count = 0u;
s_dec.data = 0u;
}
else if (s_dec.sync_found != 0u)
{
if (rf433_in_range(high, RF433_ZERO_HIGH_MIN, RF433_ZERO_HIGH_MAX) &&
rf433_in_range(low, RF433_ZERO_LOW_MIN, RF433_ZERO_LOW_MAX))
{
rf433_decode_bit(0u);
}
else if (rf433_in_range(high, RF433_ONE_HIGH_MIN, RF433_ONE_HIGH_MAX) &&
rf433_in_range(low, RF433_ONE_LOW_MIN, RF433_ONE_LOW_MAX))
{
rf433_decode_bit(1u);
}
else
{
s_dec.sync_found = 0u;
s_dec.bit_count = 0u;
s_dec.data = 0u;
}
}
s_dec.low_ticks = 0u;
s_dec.high_ticks = 1u;
}
s_dec.current_level = 1u;
}
void rf433_decoder_process(void)
{
/* DWM11 decodes directly in the 100 us sampling callback. */
}
bool rf433_decoder_get_frame(Rf433DecoderFrame_t *frame)
{
if (frame == 0 || s_dec.frame_ready == 0u)
{
return false;
}
*frame = s_dec.frame;
s_dec.frame_ready = 0u;
return true;
}
uint16_t rf433_decoder_get_lost_count(void)
{
return 0u;
}
@@ -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)
{
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;}
}
(void)context;
rf433_receive();
}
__RAM_CODE void timer3_callback(void *context)
{
(void)context;
Bridge_Deadtime_Expired();
}
@@ -9,9 +9,13 @@
#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"
#include "external_key.h"
/*********************************************************************************************************************/
void rwip_schedule(void);
@@ -21,13 +25,16 @@ 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},
{0, 10, 10, external_key_scan}, //GPIO5 external key scan
};
/**************************************************************************************
@@ -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 4:
case 3:
if(POWEROFF==deviceStatus)break;
if(Mode==mode0){
if(user_rx_buf[1]<=20)user_rx_buf[1]=20;
Brightness=user_rx_buf[1]/10;
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 5:
case 4:
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,20 @@ 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 13:
if(user_rx_buf[1] == 0x01U)
rf433_start_pairing();
else
rf433_cancel_pairing();
break;
case 14:
/* A5 guard prevents accidental clear. */
if(user_rx_buf[1] == 0xA5U)
rf433_clear_code();
break;
case 9:
break;
@@ -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,143 @@ 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 volatile uint8_t ble_remote_event_pending;
static volatile uint8_t ble_remote_event_command;
static volatile uint8_t ble_remote_event_status;
static volatile uint8_t ble_remote_event_paired_count;
static uint8_t ble_temperature_value(void)
{
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;
ble_remote_event_pending = 0U;
send_flag = 1U;
ble_state_dirty = BLE_STATE_DIRTY_ALL;
}
void ble_remote_event_notify(uint8_t command, uint8_t status,
uint8_t paired_count)
{
if(!custom_svc_tx_char_notify) return;
ble_remote_event_command = command;
ble_remote_event_status = status;
ble_remote_event_paired_count = paired_count;
ble_remote_event_pending = 1U;
}
void ble_state_sync_poll(void)
{
uint8_t data[4] = {0U, 0U, 0U, 0U};
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) return;
/*
* Remote pairing/clear acknowledgements have priority over periodic
* state synchronization so the APP receives operation results promptly.
*/
if(ble_remote_event_pending)
{
data[0] = ble_remote_event_status;
data[1] = ble_remote_event_paired_count;
data[3] = ble_remote_event_command;
if(slave_send_data(data, sizeof(data),
CUSTOM_SVC_TX_CHAR_VAL) == GATT_NO_ERROR)
ble_remote_event_pending = 0U;
return;
}
if(!ble_state_dirty) return;
if(ble_state_dirty & BLE_STATE_DIRTY_POWER)
{
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 +277,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 +325,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,8 @@ 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);
void ble_remote_event_notify(uint8_t command, uint8_t status,
uint8_t paired_count);
#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,341 @@
<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/29/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...
compiling external_key.c...
..\app\src\Mode.h(43): warning: #1295-D: Deprecated declaration choice_mode - give arg types
void choice_mode();
..\app\src\Mode.h(44): warning: #1295-D: Deprecated declaration set_mode - give arg types
void set_mode();
..\app\src\Mode.h(45): warning: #1295-D: Deprecated declaration Start_PWM - give arg types
void Start_PWM();
..\app\src\Mode.h(46): warning: #1295-D: Deprecated declaration Stop_PWM - give arg types
void Stop_PWM();
..\app\src\Mode.h(47): warning: #1295-D: Deprecated declaration Set_timing - give arg types
void Set_timing();
..\app\src\PWM.h(137): warning: #1295-D: Deprecated declaration _PWM_INIT - give arg types
void _PWM_INIT();
..\app\src\PWM.h(143): warning: #1295-D: Deprecated declaration adc_Init - give arg types
void adc_Init();
..\app\src\PWM.h(144): warning: #1295-D: Deprecated declaration My_ADC_Get_Value - give arg types
void My_ADC_Get_Value();
..\app\src\PWM.h(145): warning: #1295-D: Deprecated declaration gpio_pullup_input_inter_test - give arg types
void gpio_pullup_input_inter_test();
..\app\src\RF433.h(185): warning: #1295-D: Deprecated declaration rf433_receive - give arg types
void rf433_receive();
..\app\src\RF433.h(186): warning: #1295-D: Deprecated declaration rf433_gpio_init - give arg types
void rf433_gpio_init();
..\app\src\RF433.h(187): warning: #1295-D: Deprecated declaration scan_433 - give arg types
void scan_433();
..\app\src\RF433.h(188): warning: #1295-D: Deprecated declaration Lock_Pwm7xd - give arg types
void Lock_Pwm7xd();
..\app\src\RF433.h(189): warning: #1295-D: Deprecated declaration Delay_50us - give arg types
void Delay_50us();
..\app\src\RF433.h(190): warning: #1295-D: Deprecated declaration Encoder_key - give arg types
void Encoder_key();
..\app\src\external_key.c: 15 warnings, 0 errors
compiling timer.c...
..\app\src\PWM.h(137): warning: #1295-D: Deprecated declaration _PWM_INIT - give arg types
void _PWM_INIT();
..\app\src\PWM.h(143): warning: #1295-D: Deprecated declaration adc_Init - give arg types
void adc_Init();
..\app\src\PWM.h(144): warning: #1295-D: Deprecated declaration My_ADC_Get_Value - give arg types
void My_ADC_Get_Value();
..\app\src\PWM.h(145): warning: #1295-D: Deprecated declaration gpio_pullup_input_inter_test - give arg types
void gpio_pullup_input_inter_test();
..\app\src\mode.h(43): warning: #1295-D: Deprecated declaration choice_mode - give arg types
void choice_mode();
..\app\src\mode.h(44): warning: #1295-D: Deprecated declaration set_mode - give arg types
void set_mode();
..\app\src\mode.h(45): warning: #1295-D: Deprecated declaration Start_PWM - give arg types
void Start_PWM();
..\app\src\mode.h(46): warning: #1295-D: Deprecated declaration Stop_PWM - give arg types
void Stop_PWM();
..\app\src\mode.h(47): warning: #1295-D: Deprecated declaration Set_timing - give arg types
void Set_timing();
..\app\src\RF433.h(185): warning: #1295-D: Deprecated declaration rf433_receive - give arg types
void rf433_receive();
..\app\src\RF433.h(186): warning: #1295-D: Deprecated declaration rf433_gpio_init - give arg types
void rf433_gpio_init();
..\app\src\RF433.h(187): warning: #1295-D: Deprecated declaration scan_433 - give arg types
void scan_433();
..\app\src\RF433.h(188): warning: #1295-D: Deprecated declaration Lock_Pwm7xd - give arg types
void Lock_Pwm7xd();
..\app\src\RF433.h(189): warning: #1295-D: Deprecated declaration Delay_50us - give arg types
void Delay_50us();
..\app\src\RF433.h(190): warning: #1295-D: Deprecated declaration Encoder_key - give arg types
void Encoder_key();
..\app\src\timer.c: 15 warnings, 0 errors
compiling 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_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
..\app\src\mode.h(43): warning: #1295-D: Deprecated declaration choice_mode - give arg types
void choice_mode();
..\app\src\mode.h(44): warning: #1295-D: Deprecated declaration set_mode - give arg types
void set_mode();
..\app\src\mode.h(45): warning: #1295-D: Deprecated declaration Start_PWM - give arg types
void Start_PWM();
..\app\src\mode.h(46): warning: #1295-D: Deprecated declaration Stop_PWM - give arg types
void Stop_PWM();
..\app\src\mode.h(47): warning: #1295-D: Deprecated declaration Set_timing - give arg types
void Set_timing();
..\app\src\PWM.h(137): warning: #1295-D: Deprecated declaration _PWM_INIT - give arg types
void _PWM_INIT();
..\app\src\PWM.h(143): warning: #1295-D: Deprecated declaration adc_Init - give arg types
void adc_Init();
..\app\src\PWM.h(144): warning: #1295-D: Deprecated declaration My_ADC_Get_Value - give arg types
void My_ADC_Get_Value();
..\app\src\PWM.h(145): warning: #1295-D: Deprecated declaration gpio_pullup_input_inter_test - give arg types
void gpio_pullup_input_inter_test();
..\app\src\RF433.h(185): warning: #1295-D: Deprecated declaration rf433_receive - give arg types
void rf433_receive();
..\app\src\RF433.h(186): warning: #1295-D: Deprecated declaration rf433_gpio_init - give arg types
void rf433_gpio_init();
..\app\src\RF433.h(187): warning: #1295-D: Deprecated declaration scan_433 - give arg types
void scan_433();
..\app\src\RF433.h(188): warning: #1295-D: Deprecated declaration Lock_Pwm7xd - give arg types
void Lock_Pwm7xd();
..\app\src\RF433.h(189): warning: #1295-D: Deprecated declaration Delay_50us - give arg types
void Delay_50us();
..\app\src\RF433.h(190): warning: #1295-D: Deprecated declaration Encoder_key - give arg types
void Encoder_key();
..\app\src\fmc_spi.c(179): warning: #177-D: variable "i" was declared but never referenced
uint8_t i = 0;
..\app\src\fmc_spi.c(234): warning: #167-D: argument of type "uint8_t (*)[256]" is incompatible with parameter of type "uint8_t *"
xc_fmc_spi_flash_read_page(0x1E000,&r_data, FLASH_PAGE_SIZE);
..\app\src\fmc_spi.c: 20 warnings, 0 errors
compiling uart.c...
..\app\src\RF433.h(185): warning: #1295-D: Deprecated declaration rf433_receive - give arg types
void rf433_receive();
..\app\src\RF433.h(186): warning: #1295-D: Deprecated declaration rf433_gpio_init - give arg types
void rf433_gpio_init();
..\app\src\RF433.h(187): warning: #1295-D: Deprecated declaration scan_433 - give arg types
void scan_433();
..\app\src\RF433.h(188): warning: #1295-D: Deprecated declaration Lock_Pwm7xd - give arg types
void Lock_Pwm7xd();
..\app\src\RF433.h(189): warning: #1295-D: Deprecated declaration Delay_50us - give arg types
void Delay_50us();
..\app\src\RF433.h(190): warning: #1295-D: Deprecated declaration Encoder_key - give arg types
void Encoder_key();
..\app\src\pwm.h(137): warning: #1295-D: Deprecated declaration _PWM_INIT - give arg types
void _PWM_INIT();
..\app\src\pwm.h(143): warning: #1295-D: Deprecated declaration adc_Init - give arg types
void adc_Init();
..\app\src\pwm.h(144): warning: #1295-D: Deprecated declaration My_ADC_Get_Value - give arg types
void My_ADC_Get_Value();
..\app\src\pwm.h(145): warning: #1295-D: Deprecated declaration gpio_pullup_input_inter_test - give arg types
void gpio_pullup_input_inter_test();
..\app\src\mode.h(43): warning: #1295-D: Deprecated declaration choice_mode - give arg types
void choice_mode();
..\app\src\mode.h(44): warning: #1295-D: Deprecated declaration set_mode - give arg types
void set_mode();
..\app\src\mode.h(45): warning: #1295-D: Deprecated declaration Start_PWM - give arg types
void Start_PWM();
..\app\src\mode.h(46): warning: #1295-D: Deprecated declaration Stop_PWM - give arg types
void Stop_PWM();
..\app\src\mode.h(47): warning: #1295-D: Deprecated declaration Set_timing - give arg types
void Set_timing();
..\app\src\uart.c(153): warning: #223-D: function "temperature" declared implicitly
temperature(user_rx_buf[1]);
..\app\src\uart.c(90): warning: #177-D: variable "uart_handle" was declared but never referenced
uint8_t uart_handle = UART0_IDX;
..\app\src\uart.c(211): warning: #1-D: last line of file ends without a newline
..\app\src\uart.c: 18 warnings, 0 errors
compiling arch_main.c...
..\app\src\pwm.h(137): warning: #1295-D: Deprecated declaration _PWM_INIT - give arg types
void _PWM_INIT();
..\app\src\pwm.h(143): warning: #1295-D: Deprecated declaration adc_Init - give arg types
void adc_Init();
..\app\src\pwm.h(144): warning: #1295-D: Deprecated declaration My_ADC_Get_Value - give arg types
void My_ADC_Get_Value();
..\app\src\pwm.h(145): warning: #1295-D: Deprecated declaration gpio_pullup_input_inter_test - give arg types
void gpio_pullup_input_inter_test();
..\app\src\mode.h(43): warning: #1295-D: Deprecated declaration choice_mode - give arg types
void choice_mode();
..\app\src\mode.h(44): warning: #1295-D: Deprecated declaration set_mode - give arg types
void set_mode();
..\app\src\mode.h(45): warning: #1295-D: Deprecated declaration Start_PWM - give arg types
void Start_PWM();
..\app\src\mode.h(46): warning: #1295-D: Deprecated declaration Stop_PWM - give arg types
void Stop_PWM();
..\app\src\mode.h(47): warning: #1295-D: Deprecated declaration Set_timing - give arg types
void Set_timing();
..\app\src\RF433.h(185): warning: #1295-D: Deprecated declaration rf433_receive - give arg types
void rf433_receive();
..\app\src\RF433.h(186): warning: #1295-D: Deprecated declaration rf433_gpio_init - give arg types
void rf433_gpio_init();
..\app\src\RF433.h(187): warning: #1295-D: Deprecated declaration scan_433 - give arg types
void scan_433();
..\app\src\RF433.h(188): warning: #1295-D: Deprecated declaration Lock_Pwm7xd - give arg types
void Lock_Pwm7xd();
..\app\src\RF433.h(189): warning: #1295-D: Deprecated declaration Delay_50us - give arg types
void Delay_50us();
..\app\src\RF433.h(190): warning: #1295-D: Deprecated declaration Encoder_key - give arg types
void Encoder_key();
..\app\src\arch_main.c(163): warning: #223-D: function "xc_fmc_spi_init_oprt" declared implicitly
xc_fmc_spi_init_oprt();
..\app\src\arch_main.c(164): warning: #223-D: function "xc_fmc_spi_flash_wake_up" declared implicitly
xc_fmc_spi_flash_wake_up();
..\app\src\arch_main.c(166): warning: #223-D: function "xc_fmc_spi_flash_rdid" declared implicitly
xc_fmc_spi_flash_rdid((uint8_t *)&mid);
..\app\src\arch_main.c(171): warning: #223-D: function "xc_fmc_spi_flash_ruid" declared implicitly
xc_fmc_spi_flash_ruid(ruid);
..\app\src\arch_main.c(188): warning: #223-D: function "xc_unique_identification_read" declared implicitly
if (false == xc_unique_identification_read(co_default_bdaddr.addr)) {
..\app\src\arch_main.c(161): warning: #177-D: variable "flash_size" was declared but never referenced
uint32_t flash_size;
..\app\src\arch_main.c(162): warning: #177-D: variable "flash_type" was declared but never referenced
uint16_t flash_type;
..\app\src\arch_main.c(215): warning: #144-D: a value of type "uint32_t *" cannot be used to initialize an entity of type "uint8_t *"
uint8_t *ptr = (uint32_t *)(0x10000800);
..\app\src\arch_main.c(375): warning: #188-D: enumerated type mixed with another type
wdt_cfg.ReloadValue = WDT_CLK_32K_RESET_MODE0_8192MS;
..\app\src\arch_main.c(395): warning: #223-D: function "xc_fmc_spi_init_oprt" declared implicitly
xc_fmc_spi_init_oprt( );
..\app\src\arch_main.c(396): warning: #223-D: function "xc_fmc_spi_flash_wake_up" declared implicitly
xc_fmc_spi_flash_wake_up();
..\app\src\arch_main.c(463): warning: #223-D: function "TaskProcess" declared implicitly
TaskProcess();
..\app\src\arch_main.c: 27 warnings, 0 errors
compiling timeslice.c...
..\app\src\mode.h(43): warning: #1295-D: Deprecated declaration choice_mode - give arg types
void choice_mode();
..\app\src\mode.h(44): warning: #1295-D: Deprecated declaration set_mode - give arg types
void set_mode();
..\app\src\mode.h(45): warning: #1295-D: Deprecated declaration Start_PWM - give arg types
void Start_PWM();
..\app\src\mode.h(46): warning: #1295-D: Deprecated declaration Stop_PWM - give arg types
void Stop_PWM();
..\app\src\mode.h(47): warning: #1295-D: Deprecated declaration Set_timing - give arg types
void Set_timing();
..\app\src\RF433.h(185): warning: #1295-D: Deprecated declaration rf433_receive - give arg types
void rf433_receive();
..\app\src\RF433.h(186): warning: #1295-D: Deprecated declaration rf433_gpio_init - give arg types
void rf433_gpio_init();
..\app\src\RF433.h(187): warning: #1295-D: Deprecated declaration scan_433 - give arg types
void scan_433();
..\app\src\RF433.h(188): warning: #1295-D: Deprecated declaration Lock_Pwm7xd - give arg types
void Lock_Pwm7xd();
..\app\src\RF433.h(189): warning: #1295-D: Deprecated declaration Delay_50us - give arg types
void Delay_50us();
..\app\src\RF433.h(190): warning: #1295-D: Deprecated declaration Encoder_key - give arg types
void Encoder_key();
..\app\src\pwm.h(137): warning: #1295-D: Deprecated declaration _PWM_INIT - give arg types
void _PWM_INIT();
..\app\src\pwm.h(143): warning: #1295-D: Deprecated declaration adc_Init - give arg types
void adc_Init();
..\app\src\pwm.h(144): warning: #1295-D: Deprecated declaration My_ADC_Get_Value - give arg types
void My_ADC_Get_Value();
..\app\src\pwm.h(145): warning: #1295-D: Deprecated declaration gpio_pullup_input_inter_test - give arg types
void gpio_pullup_input_inter_test();
..\app\src\timeslice.c: 15 warnings, 0 errors
compiling Rf433.c...
..\app\src\RF433.h(185): warning: #1295-D: Deprecated declaration rf433_receive - give arg types
void rf433_receive();
..\app\src\RF433.h(186): warning: #1295-D: Deprecated declaration rf433_gpio_init - give arg types
void rf433_gpio_init();
..\app\src\RF433.h(187): warning: #1295-D: Deprecated declaration scan_433 - give arg types
void scan_433();
..\app\src\RF433.h(188): warning: #1295-D: Deprecated declaration Lock_Pwm7xd - give arg types
void Lock_Pwm7xd();
..\app\src\RF433.h(189): warning: #1295-D: Deprecated declaration Delay_50us - give arg types
void Delay_50us();
..\app\src\RF433.h(190): warning: #1295-D: Deprecated declaration Encoder_key - give arg types
void Encoder_key();
..\app\src\mode.h(43): warning: #1295-D: Deprecated declaration choice_mode - give arg types
void choice_mode();
..\app\src\mode.h(44): warning: #1295-D: Deprecated declaration set_mode - give arg types
void set_mode();
..\app\src\mode.h(45): warning: #1295-D: Deprecated declaration Start_PWM - give arg types
void Start_PWM();
..\app\src\mode.h(46): warning: #1295-D: Deprecated declaration Stop_PWM - give arg types
void Stop_PWM();
..\app\src\mode.h(47): warning: #1295-D: Deprecated declaration Set_timing - give arg types
void Set_timing();
..\app\src\pwm.h(137): warning: #1295-D: Deprecated declaration _PWM_INIT - give arg types
void _PWM_INIT();
..\app\src\pwm.h(143): warning: #1295-D: Deprecated declaration adc_Init - give arg types
void adc_Init();
..\app\src\pwm.h(144): warning: #1295-D: Deprecated declaration My_ADC_Get_Value - give arg types
void My_ADC_Get_Value();
..\app\src\pwm.h(145): warning: #1295-D: Deprecated declaration gpio_pullup_input_inter_test - give arg types
void gpio_pullup_input_inter_test();
..\app\src\Rf433.c(659): warning: #223-D: function "temperature" declared implicitly
temperature((uint8_t)(((uint16_t)(255U - res_data) * 255U + 119U) / 239U));
..\app\src\Rf433.c(24): warning: #177-D: variable "POWER_flag" was declared but never referenced
static uint8_t POWER_flag;
..\app\src\Rf433.c: 17 warnings, 0 errors
compiling Mode.c...
..\app\src\pwm.h(137): warning: #1295-D: Deprecated declaration _PWM_INIT - give arg types
void _PWM_INIT();
..\app\src\pwm.h(143): warning: #1295-D: Deprecated declaration adc_Init - give arg types
void adc_Init();
..\app\src\pwm.h(144): warning: #1295-D: Deprecated declaration My_ADC_Get_Value - give arg types
void My_ADC_Get_Value();
..\app\src\pwm.h(145): warning: #1295-D: Deprecated declaration gpio_pullup_input_inter_test - give arg types
void gpio_pullup_input_inter_test();
..\app\src\mode.h(43): warning: #1295-D: Deprecated declaration choice_mode - give arg types
void choice_mode();
..\app\src\mode.h(44): warning: #1295-D: Deprecated declaration set_mode - give arg types
void set_mode();
..\app\src\mode.h(45): warning: #1295-D: Deprecated declaration Start_PWM - give arg types
void Start_PWM();
..\app\src\mode.h(46): warning: #1295-D: Deprecated declaration Stop_PWM - give arg types
void Stop_PWM();
..\app\src\mode.h(47): warning: #1295-D: Deprecated declaration Set_timing - give arg types
void Set_timing();
..\app\src\RF433.h(185): warning: #1295-D: Deprecated declaration rf433_receive - give arg types
void rf433_receive();
..\app\src\RF433.h(186): warning: #1295-D: Deprecated declaration rf433_gpio_init - give arg types
void rf433_gpio_init();
..\app\src\RF433.h(187): warning: #1295-D: Deprecated declaration scan_433 - give arg types
void scan_433();
..\app\src\RF433.h(188): warning: #1295-D: Deprecated declaration Lock_Pwm7xd - give arg types
void Lock_Pwm7xd();
..\app\src\RF433.h(189): warning: #1295-D: Deprecated declaration Delay_50us - give arg types
void Delay_50us();
..\app\src\RF433.h(190): warning: #1295-D: Deprecated declaration Encoder_key - give arg types
void Encoder_key();
..\app\src\Mode.c: 15 warnings, 0 errors
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=32588 RO-data=2208 RW-data=2828 ZI-data=3856
FromELF: creating hex file...
After Build - User command #1: fromelf --bin --output=app.bin .\Objects\Xinc_ble_sdk.axf
After Build - User command #2: .\output_tool\ge_ota_scan.bat
Size of file: 27312 bytes.
all_size=27312
Size of file: 35064 bytes.
all_size=35064
dual_xip
Addr:13000
Size:0x6ab0
Size:0x88f8
BAddr:0x40000
Acheck:0x34822540
Acheck:0xf227e680
SoftVer:0x10
RomVer:0x20
LoadAddr:0x11013000
@@ -90,9 +366,8 @@ status2=1
需要填充0个sector
updata file success !
已复制 1 个文件
系统找不到指定的路径
已复制 0 个文件
".\Objects\Xinc_ble_sdk.axf" - 0 Error(s), 9 Warning(s).
已复制 1 个文件
".\Objects\Xinc_ble_sdk.axf" - 0 Error(s), 142 Warning(s).
<h2>Software Packages used:</h2>
@@ -102,10 +377,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:08
</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"
@@ -44,7 +42,11 @@
".\objects\rgblight.o"
".\objects\mode.o"
".\objects\rf433.o"
".\objects\rf433_decoder.o"
".\objects\pwm.o"
".\objects\bridge_pwm.o"
".\objects\light_transition.o"
".\objects\external_key.o"
".\objects\fmc_spi.o"
--strict --scatter ".\Linker\cpu_xip_scan.scat"
--feedback fb.txt --summary_stderr --info summarysizes --map --load_addr_map_info --xref --callgraph --symbols
@@ -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,9 +129,11 @@
.\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\rf433_decoder.h
.\objects\arch_main.o: ..\app\src\external_key.h
.\objects\arch_main.o: ..\app\src\rgblight.h
.\objects\arch_main.o: ..\app\src\timer.h
.\objects\arch_main.o: ..\app\src\fmc_spi.h
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
@@ -0,0 +1,63 @@
.\objects\external_key.o: ..\app\src\external_key.c
.\objects\external_key.o: ..\app\src\external_key.h
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_gpio.h
.\objects\external_key.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stdbool.h
.\objects\external_key.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stdio.h
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc6xxx.h
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc60xx.h
.\objects\external_key.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stdint.h
.\objects\external_key.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\string.h
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\core_cm0.h
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\core_cmInstr.h
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\core_cmFunc.h
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_conf.h
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc_m0_register\xc_reg_cpr.h
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc_m0_register\xc_reg_offset.h
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc_m0_register\xc_reg_cprao.h
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc_m0_register\xc_reg_rf.h
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc_m0_register\xc_reg_adc.h
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc_m0_register\xc_reg_aotimer.h
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc6xxx.h
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc_m0_register\xc_reg_dma.h
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc_m0_register\xc_reg_fmc.h
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc_m0_register\xc_reg_fmc_cache.h
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc_m0_register\xc_reg_gpio.h
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc_m0_register\xc_reg_i2c.h
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc_m0_register\xc_reg_qdec.h
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc_m0_register\xc_reg_pwm.h
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc_m0_register\xc_reg_pwm_comn.h
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc_m0_register\xc_reg_rtc.h
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\core_cm0.h
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc_m0_register\xc_reg_spi.h
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc_m0_register\xc_reg_timer.h
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc_m0_register\xc_reg_uart.h
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc_m0_register\xc_reg_wdt.h
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\CMSIS\Device\xc_m0_register\xc_reg_pwm_timer.h
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_calib.h
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_clock.h
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_systick.h
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_pwr.h
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_gpio.h
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_aotimer.h
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_timer.h
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_rtc.h
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_uart.h
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\ringbuffer.h
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_dma.h
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_spi.h
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_spi_dma.h
.\objects\external_key.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stdlib.h
.\objects\external_key.o: ..\..\..\..\..\component\ble\modules\flash\xc6xxx_fmc_spi.h
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_fmc_spi_dma.h
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_uart_dma.h
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_i2c.h
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_sw_i2c.h
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_wdt.h
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_adc.h
.\objects\external_key.o: ..\..\..\..\..\component\xc6xx_drivers\Drivers\xc_driver\xc_drv_pwm.h
.\objects\external_key.o: ..\app\src\Mode.h
.\objects\external_key.o: ..\app\src\PWM.h
.\objects\external_key.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\math.h
.\objects\external_key.o: ..\app\src\RF433.h
.\objects\external_key.o: ..\app\src\timer.h
.\objects\external_key.o: ..\app\src\timeslice.h
@@ -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,6 @@
.\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
.\objects\fmc_spi.o: ..\app\src\timeslice.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
@@ -97,3 +97,5 @@
.\objects\ota_flash_interface.o: ..\..\..\..\..\component\ble\modules\dbg\api\dbg_trc.h
.\objects\ota_flash_interface.o: ..\app\src\ota_protocol.h
.\objects\ota_flash_interface.o: ..\app\src\fmc_spi.h
.\objects\ota_flash_interface.o: ..\app\src\PWM.h
.\objects\ota_flash_interface.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\math.h
@@ -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
@@ -58,5 +58,80 @@
.\objects\rf433.o: ..\app\src\uart.h
.\objects\rf433.o: ..\app\src\mode.h
.\objects\rf433.o: ..\app\src\timer.h
.\objects\rf433.o: ..\app\src\light_transition.h
.\objects\rf433.o: ..\app\src\pwm.h
.\objects\rf433.o: C:\keil5\ARM\ARMCC\Bin\..\include\math.h
.\objects\rf433.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\math.h
.\objects\rf433.o: ..\app\src\rf433_decoder.h
.\objects\rf433.o: ..\app\src\timeslice.h
.\objects\rf433.o: ..\app\src\usr_server.h
.\objects\rf433.o: ..\app\api\app_task.h
.\objects\rf433.o: ..\..\..\..\..\component\ble\modules\common\api\co_bt_defines.h
.\objects\rf433.o: ..\..\..\..\..\component\ble\modules\dbg\api\dbg.h
.\objects\rf433.o: ..\..\..\..\..\component\ble\modules\rwip\api\rwip_config.h
.\objects\rf433.o: ..\..\..\..\..\component\ble\ip\ble\ll\api\rwble_config.h
.\objects\rf433.o: ..\..\..\..\..\component\ble\modules\rwip\api\rwip_config.h
.\objects\rf433.o: ..\..\..\..\..\component\ble\ip\ble\hl\inc\rwble_hl_config.h
.\objects\rf433.o: ..\..\..\..\..\component\ble\ip\ble\hl\api\rwble_hl_error.h
.\objects\rf433.o: ..\..\..\..\..\component\ble\ip\ble\hl\inc\rwprf_config.h
.\objects\rf433.o: ..\app\api\rwapp_config.h
.\objects\rf433.o: ..\..\..\..\..\component\ble\modules\dbg\api\dbg_swdiag.h
.\objects\rf433.o: ..\..\..\..\..\component\ble\modules\dbg\api\dbg_trc.h
.\objects\rf433.o: ..\..\..\..\..\component\ble\ip\ble\hl\src\gap\gapm\gapm_int.h
.\objects\rf433.o: ..\..\..\..\..\component\ble\ip\ble\hl\api\gapm.h
.\objects\rf433.o: ..\..\..\..\..\component\ble\ip\ble\hl\api\gapm_msg.h
.\objects\rf433.o: ..\..\..\..\..\component\ble\modules\rwip\api\rwip_task.h
.\objects\rf433.o: ..\..\..\..\..\component\ble\ip\ble\hl\api\gap.h
.\objects\rf433.o: ..\..\..\..\..\component\ble\plf\refip\src\arch\compiler\gnuarm\compiler.h
.\objects\rf433.o: ..\..\..\..\..\component\ble\modules\common\api\co_bt.h
.\objects\rf433.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stddef.h
.\objects\rf433.o: ..\..\..\..\..\component\ble\modules\common\api\co_lmp.h
.\objects\rf433.o: ..\..\..\..\..\component\ble\modules\common\api\co_bt.h
.\objects\rf433.o: ..\..\..\..\..\component\ble\modules\common\api\co_hci.h
.\objects\rf433.o: ..\..\..\..\..\component\ble\plf\refip\src\arch\compiler\gnuarm\compiler.h
.\objects\rf433.o: ..\..\..\..\..\component\ble\modules\common\api\co_error.h
.\objects\rf433.o: ..\..\..\..\..\component\ble\modules\common\api\co_list.h
.\objects\rf433.o: ..\..\..\..\..\component\ble\plf\refip\src\arch\compiler\gnuarm\compiler.h
.\objects\rf433.o: ..\..\..\..\..\component\ble\modules\ke\api\ke_task.h
.\objects\rf433.o: ..\..\..\..\..\component\ble\plf\refip\src\arch\compiler\gnuarm\compiler.h
.\objects\rf433.o: ..\..\..\..\..\component\ble\modules\ke\api\ke_msg.h
.\objects\rf433.o: ..\..\..\..\..\component\ble\plf\refip\src\arch\arch.h
.\objects\rf433.o: ..\..\..\..\..\component\ble\plf\refip\src\arch\compiler\gnuarm\compiler.h
.\objects\rf433.o: ..\..\..\..\..\component\ble\plf\refip\src\arch\ll\gnuarm\ll.h
.\objects\rf433.o: ..\..\..\..\..\component\ble\plf\refip\src\arch\arch.h
.\objects\rf433.o: ..\..\..\..\..\component\ble\plf\refip\src\build\ble-full\reg\fw\reg_intc.h
.\objects\rf433.o: ..\..\..\..\..\component\ble\plf\refip\src\build\ble-full\reg\fw\_reg_intc.h
.\objects\rf433.o: ..\..\..\..\..\component\ble\plf\refip\src\arch\compiler\gnuarm\compiler.h
.\objects\rf433.o: ..\..\..\..\..\component\ble\plf\refip\src\driver\reg\reg_access.h
.\objects\rf433.o: ..\..\..\..\..\component\ble\modules\common\api\co_utils.h
.\objects\rf433.o: ..\..\..\..\..\component\ble\modules\rwip\api\rwip.h
.\objects\rf433.o: ..\..\..\..\..\component\ble\plf\refip\src\arch\compiler\gnuarm\compiler.h
.\objects\rf433.o: ..\..\..\..\..\component\ble\ip\em\api\em_map.h
.\objects\rf433.o: ..\..\..\..\..\component\ble\modules\common\api\co_math.h
.\objects\rf433.o: ..\..\..\..\..\component\ble\plf\refip\src\arch\compiler\gnuarm\compiler.h
.\objects\rf433.o: ..\..\..\..\..\component\ble\plf\refip\src\build\ble-full\reg\fw\_reg_em_et.h
.\objects\rf433.o: ..\..\..\..\..\component\ble\ip\ble\ll\api\em_map_ble.h
.\objects\rf433.o: ..\..\..\..\..\component\ble\modules\common\api\co_llcp.h
.\objects\rf433.o: ..\..\..\..\..\component\ble\plf\refip\src\build\ble-full\reg\fw\_reg_em_ble_cs.h
.\objects\rf433.o: ..\..\..\..\..\component\ble\plf\refip\src\build\ble-full\reg\fw\_reg_em_ble_tx_desc.h
.\objects\rf433.o: ..\..\..\..\..\component\ble\plf\refip\src\build\ble-full\reg\fw\_reg_em_ble_rx_desc.h
.\objects\rf433.o: ..\..\..\..\..\component\ble\plf\refip\src\build\ble-full\reg\fw\_reg_em_ble_rx_cte_desc.h
.\objects\rf433.o: ..\..\..\..\..\component\ble\plf\refip\src\build\ble-full\reg\fw\_reg_em_ble_wpal.h
.\objects\rf433.o: ..\..\..\..\..\component\ble\plf\refip\src\build\ble-full\reg\fw\_reg_em_ble_ral.h
.\objects\rf433.o: ..\..\..\..\..\component\ble\plf\refip\src\arch\compiler\gnuarm\compiler.h
.\objects\rf433.o: ..\..\..\..\..\component\ble\ip\ble\hl\src\gatt\gatt_msg_int.h
.\objects\rf433.o: ..\..\..\..\..\component\ble\ip\ble\hl\api\gatt.h
.\objects\rf433.o: ..\..\..\..\..\component\ble\plf\refip\src\arch\compiler\gnuarm\compiler.h
.\objects\rf433.o: ..\..\..\..\..\component\ble\ip\ble\hl\api\gatt_msg.h
.\objects\rf433.o: ..\..\..\..\..\component\ble\plf\refip\src\arch\compiler\gnuarm\compiler.h
.\objects\rf433.o: ..\..\..\..\..\component\ble\ip\ble\hl\api\l2cap.h
.\objects\rf433.o: ..\..\..\..\..\component\ble\plf\refip\src\arch\compiler\gnuarm\compiler.h
.\objects\rf433.o: ..\..\..\..\..\component\ble\ip\ble\hl\api\l2cap_msg.h
.\objects\rf433.o: ..\..\..\..\..\component\ble\plf\refip\src\arch\compiler\gnuarm\compiler.h
.\objects\rf433.o: ..\..\..\..\..\component\ble\modules\common\api\co_buf.h
.\objects\rf433.o: ..\..\..\..\..\component\ble\modules\ke\api\ke_mem.h
.\objects\rf433.o: ..\app\src\ota_server.h
.\objects\rf433.o: ..\app\api\app_task.h
.\objects\rf433.o: ..\..\..\..\..\component\ble\ip\ble\api\xc_gatt_server_api.h
.\objects\rf433.o: ..\..\..\..\..\component\ble\ip\ble\hl\src\gatt\gatt_db.h
.\objects\rf433.o: ..\..\..\..\..\component\ble\ip\ble\api\xc_gap_api.h
.\objects\rf433.o: ..\..\..\..\..\component\ble\ip\ble\hl\api\gapc_msg.h
@@ -0,0 +1,5 @@
.\objects\rf433_decoder.o: ..\app\src\rf433_decoder.c
.\objects\rf433_decoder.o: ..\app\src\rf433_decoder.h
.\objects\rf433_decoder.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stdbool.h
.\objects\rf433_decoder.o: D:\Program Files\Keil_v5\ARM\ARMCC\Bin\..\include\stdint.h
.\objects\rf433_decoder.o: ..\app\src\rf433_decoder_port.h
@@ -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

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