demo app + SDK updates:\n- Add direct ANI transfer (prepare -> transfer)\n- Add firmware update flow (fetch latest w/ x-api-key, OTA transfer)\n- Extract x-api-key to NetworkConstants\n- Rename example app to demo; move folder and entry to DemoApp\n- Switch from SPM package dependency to local framework target\n- Enable automatic Info.plist generation for framework target\n- Add placeholder test to satisfy SwiftPM test target\n- Regenerate XcodeGen project (demo.xcodeproj)

This commit is contained in:
km2023
2026-04-09 18:41:56 +08:00
parent c33e7d3fa1
commit 7d9ff3081d
30 changed files with 2594 additions and 516 deletions

View File

@@ -0,0 +1,20 @@
import Foundation
/// BLE
/// : [head:1][type:1][subpageTotal:2][curPage:2][dataLen:2][data:N][checksum:1]
public struct ProtocolFrame: Sendable {
/// (0xC7 = APPDevice, 0xB0 = DeviceAPP)
public let head: UInt8
/// CommandType
public let type: UInt8
/// (0 = )
public let subpageTotal: UInt16
/// ( total-1 0)
public let curPage: UInt16
///
public let dataLen: UInt16
///
public let data: Data
///
public let checksum: UInt8
}