[feat] modify lamp&heat&dac to 4Hz

This commit is contained in:
zhji 2025-10-10 11:57:48 +08:00
parent c1e34d2038
commit ce7a38acda
4 changed files with 5 additions and 12 deletions

View File

@ -5,7 +5,7 @@
extern "C" {
#endif
#define LEDIR_FREQ (8)
#define LEDIR_FREQ (4)
#define SAMPLES_PER_PERIOD (64)
#ifdef __cplusplus

View File

@ -36,7 +36,7 @@ void heat_loop(void)
{
static uint32_t ms = 0;
if (system_tick_cnt < (ms + 62)) {
if (system_tick_cnt < (ms + 125)) {
return;
}
ms = system_tick_cnt;

View File

@ -7,15 +7,7 @@
uint8_t data_ltc2640_output[LTC2640_OUTPUT_LEN];
uint16_t data_ltc2640[] = {
VOLTAGE_200MV,
VOLTAGE_300MV,
VOLTAGE_400MV,
VOLTAGE_1000MV,
VOLTAGE_1200MV,
VOLTAGE_1500MV,
VOLTAGE_1800MV,
VOLTAGE_2000MV,
VOLTAGE_2400MV,
VOLTAGE_500MV,
VOLTAGE_2500MV,
};
@ -98,7 +90,7 @@ void ltc2640_loop(void)
static uint32_t ms = 0;
static uint32_t cnt = 0;
if (system_tick_cnt < (ms + 100)) {
if (system_tick_cnt < (ms + 125)) {
return;
}
GPIO_SetBits(GPIOA, LTC2640_PIN_CS);

View File

@ -17,6 +17,7 @@
#define VOLTAGE_200MV (328)
#define VOLTAGE_300MV (492)
#define VOLTAGE_400MV (655)
#define VOLTAGE_500MV (819)
#define VOLTAGE_1000MV (1638)
#define VOLTAGE_1200MV (1966)
#define VOLTAGE_1500MV (2458)