STM_ATEM/User/optic_mag_driver.h
zhoujie 047ef08318 🐛 fix(optic_mag_driver): 修正光泵磁力计数据单位
- 将数据单位从 0.0001 nT 改为 0.001 nT
- 更新注释中的示例值以匹配新的单位换算
2026-06-08 21:30:32 +08:00

21 lines
590 B
C
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#ifndef OPTIC_MAG_DRIVER_H
#define OPTIC_MAG_DRIVER_H
#include "main.h"
#include <stdint.h>
#define OPTIC_MAG_FRAME_START 0x5A
#define OPTIC_MAG_FRAME_END 0xA5
#define OPTIC_MAG_DATA_BYTES 10
// 单位 0.001 nT忽略末位BCD数字取前9位
// 例如 123456789 表示 123456.789 nT
extern volatile uint32_t g_optic_mag_value;
extern volatile uint8_t g_optic_mag_fresh;
void OpticMag_Init(UART_HandleTypeDef *huart);
void OpticMag_UART_RxCpltCallback(UART_HandleTypeDef *huart);
void OpticMag_UART_ErrorCallback(UART_HandleTypeDef *huart);
#endif // OPTIC_MAG_DRIVER_H