发布PWM32EPRO V2.0版本
This commit is contained in:
@@ -397,7 +397,7 @@
|
||||
|
||||
|
||||
/// Default Device Name
|
||||
#define APP_DFLT_DEVICE_NAME ("DWM22") //
|
||||
#define APP_DFLT_DEVICE_NAME ("PWM32EPRO") //
|
||||
#define APP_DFLT_DEVICE_NAME_LEN (sizeof(APP_DFLT_DEVICE_NAME))
|
||||
#define APP_DFLT_DEVICE_NAME_LEN1 (sizeof(APP_DFLT_DEVICE_NAME1))
|
||||
#define APP_DFLT_DEVICE_NAME2 ("Second_test")
|
||||
|
||||
@@ -452,7 +452,6 @@ 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. */
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
* Dual-color output uses one fixed 500 us frame:
|
||||
* OFF -> W pulse -> OFF -> C pulse -> OFF to frame end.
|
||||
* The available OFF time is distributed around both direction changes and
|
||||
* each W/C transition retains at least 25 us protection.
|
||||
* each W/C transition retains at least 50 us protection.
|
||||
* Normal dual-color output produces one pulse per color per frame (2 kHz).
|
||||
* Only the low-output neutral section of three-color breathing uses PDM.
|
||||
*/
|
||||
@@ -24,8 +24,8 @@
|
||||
#define BRIDGE_PWM_PERIOD 6U
|
||||
#define BRIDGE_MIX_SCALE 1000U
|
||||
#define BRIDGE_FRAME_US 500U
|
||||
#define BRIDGE_DEADTIME_US 25U
|
||||
#define BRIDGE_DUAL_ACTIVE_US 450U
|
||||
#define BRIDGE_DEADTIME_US 50U
|
||||
#define BRIDGE_DUAL_ACTIVE_US 400U
|
||||
#define BRIDGE_MIN_DUAL_PULSE_US 1U
|
||||
#define BRIDGE_NEUTRAL_PDM_PULSE_US 50U
|
||||
#define BRIDGE_TIMER_TICKS_PER_US 16U
|
||||
@@ -521,7 +521,7 @@ __RAM_CODE void Bridge_Service_1ms(void)
|
||||
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
|
||||
* Use the same 400 us maximum energy as mixed light for every
|
||||
* single-color output. Switching between the hardware-PWM and
|
||||
* Timer3 mixed-light paths therefore does not change total energy.
|
||||
*/
|
||||
@@ -550,9 +550,9 @@ __RAM_CODE void Bridge_Service_1ms(void)
|
||||
if (cached_w_mix != w_mix || cached_c_mix != c_mix ||
|
||||
output_mode != BRIDGE_MODE_DUAL) {
|
||||
/*
|
||||
* Keep 50 us OFF at maximum dual-color brightness. The OFF time is
|
||||
* split evenly between W->C and C->W, which both absorbs interrupt
|
||||
* latency and spreads the two optical pulses across the 500 us frame.
|
||||
* Keep 100 us OFF at maximum dual-color brightness. The OFF time is
|
||||
* split evenly into 50 us for W->C and 50 us for C->W. This absorbs
|
||||
* interrupt latency and spreads both optical pulses across the frame.
|
||||
*/
|
||||
total_on_us = (BRIDGE_DUAL_ACTIVE_US * total +
|
||||
(BRIDGE_MIX_SCALE / 2U)) / BRIDGE_MIX_SCALE;
|
||||
|
||||
@@ -34,7 +34,6 @@ TASK_COMPONENTS TaskComps[] =
|
||||
{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
|
||||
};
|
||||
|
||||
/**************************************************************************************
|
||||
|
||||
Reference in New Issue
Block a user