From b3dc672c57aa5374fcd1ba1da5321d6c63d68e0f Mon Sep 17 00:00:00 2001
From: guowenxue <guowenxue@gmail.com>
Date: Thu, 14 Mar 2024 10:47:14 +0800
Subject: [PATCH] Add SHT20 and AT24C256 Logic Analyzer LA5016 capture data

---
 modules/at24c.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/modules/at24c.c b/modules/at24c.c
index 2c12f88..aaa05e6 100644
--- a/modules/at24c.c
+++ b/modules/at24c.c
@@ -335,6 +335,8 @@
      * or it will over write the start bytes of this page  */
     if( offset%eeprom->pagesize )
         bytes = eeprom->pagesize - offset%eeprom->pagesize;
+    else
+        bytes = len>eeprom->pagesize? eeprom->pagesize : len;
 
     /* Write max one page at a time */
     while(len > 0)

--
Gitblit v1.9.1