27
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
#define SENSOR_TOTAL_LINES (SENSOR_HEIGHT + 1) // +1 ²ÎÊýÐÐ
|
||||
#define BYTES_PER_LINE (SENSOR_WIDTH * 2) // ÿÐÐ512×Ö½Ú
|
||||
|
||||
#define ALARM_TEMP_RAW 8000 // 80.00¡æ (raw/100)
|
||||
#define ALARM_TEMP_RAW 800 // 80.0¡æ (raw/10)
|
||||
|
||||
extern volatile uint8_t Line_Ready_Flag;
|
||||
extern volatile uint8_t *Ready_Line_Ptr;
|
||||
|
||||
@@ -3,23 +3,21 @@
|
||||
|
||||
#include "ch32v30x.h"
|
||||
|
||||
/* ---- Temporary debug wiring option ----
|
||||
* Set to 1 to use USART3 (PB10=TX PB11=RX) for sensor communication.
|
||||
* This steals the debug printf port — use JTAG debugger for observation.
|
||||
* Set to 0 for normal operation (USART2 / PA2+PA3). */
|
||||
#define SENSOR_USE_USART3 0
|
||||
|
||||
/* Set to 1 to enable UART commands to configure sensor at boot.
|
||||
* Set to 0 if sensor is pre-configured via USB to auto-output CMOS/DVP.
|
||||
* Automatically forced to 1 when SENSOR_USE_USART3 is enabled. */
|
||||
#if SENSOR_USE_USART3
|
||||
#define SENSOR_UART_ENABLE 1
|
||||
#define SENSOR_UART USART3
|
||||
#else
|
||||
#define SENSOR_UART_ENABLE 0
|
||||
#define SENSOR_UART USART2
|
||||
#endif
|
||||
/* ---- Sensor UART configuration ----
|
||||
* 模组已通过 USB 预配置,不需要 MCU UART 配置。
|
||||
* 注意:USART2 (PA2/PA3) 引脚已被占用,不可使用。
|
||||
* 如需重新启用 MCU UART 配置传感器,将下面的 #if 0 改为 #if 1。
|
||||
* 启用后仅可使用 USART3 (PB10/PB11),但会占用 printf 调试口。 */
|
||||
#if 0 /* MCU UART 配置已禁用 */
|
||||
#define SENSOR_USE_USART3 1 /* 必须用 USART3,USART2 引脚已占用 */
|
||||
#define SENSOR_UART_ENABLE 1
|
||||
#define SENSOR_UART USART3
|
||||
#define SENSOR_UART_BAUD 115200
|
||||
#else
|
||||
#define SENSOR_USE_USART3 0
|
||||
#define SENSOR_UART_ENABLE 0
|
||||
#define SENSOR_UART_BAUD 115200
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Initialize sensor. When SENSOR_UART_ENABLE=1, configures via UART.
|
||||
|
||||
Reference in New Issue
Block a user