feat: 完成基本的Jpeg控制

This commit is contained in:
2025-08-08 18:38:16 +08:00
parent 58378851bb
commit 771f5e8e9f
7 changed files with 390 additions and 89 deletions

View File

@@ -8,8 +8,8 @@ static class I2cAddr
const UInt32 Base = 0x6000_0000;
/// <summary>
/// 0x0000_0000:
/// <summary>
/// 0x0000_0000:
/// [7:0] 本次传输的i2c地址(最高位总为0);
/// [8] 1为读0为写;
/// [16] 1为SCCB协议0为I2C协议;
@@ -17,45 +17,45 @@ static class I2cAddr
/// </summary>
public const UInt32 BaseConfig = Base + 0x0000_0000;
/// <summary>
/// <summary>
/// 0x0000_0001:
/// [15:0] 本次传输的数据量以字节为单位0为传1个字节;
/// [31:16] 若本次传输为读的DUMMY数据量字节为单位0为传1个字节
/// </summary>
public const UInt32 TranConfig = Base + 0x0000_0001;
/// <summary>
/// <summary>
/// 0x0000_0002: [0] cmd_done; [8] cmd_error;
/// </summary>
public const UInt32 Flag = Base + 0x0000_0002;
/// <summary>
/// <summary>
/// 0x0000_0003: FIFO写入口仅低8位有效只写
/// </summary>
public const UInt32 Write = Base + 0x0000_0003;
/// <summary>
/// <summary>
/// 0x0000_0004: FIFO读出口仅低8位有效只读
/// </summary>
public const UInt32 Read = Base + 0x0000_0004;
/// <summary>
/// <summary>
/// 0x0000_0005: [0] FIFO写入口清空[8] FIFO读出口清空
/// </summary>
public const UInt32 Clear = Base + 0x0000_0005;
}
/// <summary>
/// <summary>
/// [TODO:Enum]
/// </summary>
public enum I2cProtocol
{
/// <summary>
/// <summary>
/// [TODO:Enum]
/// </summary>
I2c = 0,
/// <summary>
/// <summary>
/// [TODO:Enum]
/// </summary>
SCCB = 1
@@ -296,7 +296,7 @@ public class I2c
// 读取数据
{
var ret = await UDPClientPool.ReadAddr(this.ep, this.taskID, I2cAddr.Read);
var ret = await UDPClientPool.ReadAddrByte(this.ep, this.taskID, I2cAddr.Read);
if (!ret.IsSuccessful)
{
logger.Error($"Failed to read data from I2C FIFO: {ret.Error}");