Skip to content

Implement battery service (all 15 opcodes) #62

Description

@dymk

Task\n\nImplement all 15 battery opcodes with stateful Battery struct:\n\nBTP, BMC, BST, BIX, BPC, BPS, BCT, BCV, BAR, BAT_DIS, BAT_STA, BAT_PSR, BAT_SOC, BAT_CYC, BAT_FCC\n\n### Key design decisions\n- set_flag byte mechanism for BTP/BMC to distinguish 'set to zero' from 'no update'\n- Stack-based Battery struct (no_std compatible)\n- Response serialization via fixed-size byte array packing\n\nAdd 20+ unit tests covering all opcodes, edge cases, and the BTP/BMC zero-value write fix.\n\n## Files\n- platform/qemu-sp/src/battery.rs\n\n## PR\n- #57\n\n## Parent\nPart of #60

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions