@@ -331,9 +331,9 @@ typedef enum {
331331// ---- NeoPixel Registers ----
332332#define M5PM1_REG_NEO_CFG \
333333 0x50 // R/W NeoPixel配置 / NeoPixel configuration
334- // [7-6 ] 保留 / Reserved
335- // [5 ] REFRESH - 写1刷新LED / REFRESH - write 1 to refresh LEDs
336- // [4 :0] LED_CNT - LED数量 (1-31,5位寄存器限制 ) / LED count (1-31, 5-bit register limit )
334+ // [7] 保留 / Reserved
335+ // [6 ] REFRESH - 写1刷新LED / REFRESH - write 1 to refresh LEDs
336+ // [5 :0] LED_CNT - LED数量 (1-32,固件最大支持32 ) / LED count (1-32, firmware max 32 )
337337#define M5PM1_REG_AW8737A_PULSE \
338338 0x53 // R/W AW8737A脉冲控制 / AW8737A pulse control
339339 // 用于控制AW8737A音频放大器增益 / Used to control AW8737A audio amplifier gain
@@ -384,8 +384,8 @@ typedef enum {
384384
385385// ---- NeoPixel配置寄存器位 ----
386386// ---- NEO_CFG Register Bits ----
387- #define M5PM1_NEO_CFG_REFRESH (1 << 5 ) // 刷新标志 / Refresh flag (write 1 to update LEDs)
388- #define M5PM1_NEO_CFG_COUNT_MASK 0x1F // LED数量掩码 / LED count mask (0-31 )
387+ #define M5PM1_NEO_CFG_REFRESH (1 << 6 ) // 刷新标志 / Refresh flag (write 1 to update LEDs)
388+ #define M5PM1_NEO_CFG_COUNT_MASK 0x3F // LED数量掩码 / LED count mask (0-63, firmware max 32 )
389389
390390// ============================
391391// 枚举类型
@@ -2411,12 +2411,12 @@ class M5PM1 {
24112411 /* *
24122412 * @brief 设置 NeoPixel LED 数量
24132413 * Set NeoPixel LED count
2414- * @param count LED 数量 (1-31,受5位寄存器限制 )
2415- * LED count (1-31, limited by 5-bit register )
2414+ * @param count LED 数量 (1-32 )
2415+ * LED count (1-32 )
24162416 * @return 成功返回 M5PM1_OK,否则返回错误码
24172417 * Return M5PM1_OK on success, error code otherwise
2418- * @note 寄存器为5位宽度,最大值为31。设置为32会溢出为0
2419- * Register is 5 -bit wide, maximum value is 31. Setting to 32 will overflow to 0
2418+ * @note 寄存器为6位宽度[5:0],固件最大支持32个LED
2419+ * Register is 6 -bit wide [5:0], firmware supports max 32 LEDs
24202420 */
24212421 m5pm1_err_t setLedCount (uint8_t count);
24222422
0 commit comments