fix/audit-perf #23
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/audit-perf"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
tools1.x register API. The legacy fb8615b0df`tools::register::{read_register, write_register}` re-exports no longer exist: the SX1278 driver now calls `tools::register::msb_flag::{read_register, write_register}` and propagates the `Result` returned by the fallible register layer. The SX1278 SPI wire bytes are unchanged (write command is still `address | 0x80`, read command `address & 0x7F`); only import paths and error handling migrate. Note that the `tools` bus layer now sends a write as two SPI write operations (command byte, then payload) inside a single chip-select window; reads use one full-duplex transfer as before. - **Breaking**: `LoRaError` gains a second generic parameter, the chip-select pin error type (`LoRaError<SpiErr, CsErr>`), and two new variants: `Cs(CsErr)` for chip-select failures and `RegisterProtocol` for register accesses rejected by the `tools` protocol layer. SPI and chip-select bus failures are now surfaced instead of being masked. - **Breaking**: methods that touched registers and were previously infallible now return `Result<(), LoRaError<..>>`: `set_mode`, `set_frequency`, `deep_sleep`, `wake_from_deep_sleep`; `read_version` returns `Result<u8, LoRaError<..>>`. - Dependency: move to the `tools` 1.x line. `tools` 1.x is not published to any registry yet, so the crate uses a path dependency (`../tools`) for now; the registry line is kept commented with the target version (`1.2.1`) to restore once published. - The SX1278 FIFO is now filled (TX) and drained (RX) in multi-byte bursts of up to 32 bytes per chip-select window (the MSB-flag protocol frame cap) instead of one register access per byte. The FIFO payload bytes are identical; only the SPI transaction grouping changes. Pure chip-select delay per full 255-byte FIFO drops from about 5.1 ms to about 0.16 ms in each direction. Note that FIFO reads now use the two-transaction burst shape (command write, then full-duplex payload) instead of the single full-duplex transfer used for one-byte reads.