Browse files

[ncp-spi] improve callback implementation, change code style format (#…


This commit makes the following changes in `NcpSpi` class:

- It adds a new class `SpiFrame` which provides helper methods to
  parse and update the header fields in the header of an SPI  frame.
- It simplifies/enhances the `SpiTransactionComplete()` callback
  implementation by combining the parsing of input/output frame
  headers with the rx/tx frame processing.
- It adds a check for correct pattern bits in a received frame
  flag byte (frames with incorrect pattern bits are ignored).
- Code format is changed to follow the "pretty" style.
- Fixes a rare issue with a possible incorrect accept length on
  the first SPI transaction after NCP reset.
  • Loading branch information...
abtink authored and jwhui committed Jun 11, 2018
1 parent 2f9bd17 commit 90b160ccfaf2d8f8595919c07c7ea469989e4b0c
Showing with 273 additions and 163 deletions.
  1. +119 −135 src/ncp/ncp_spi.cpp
  2. +154 −28 src/ncp/ncp_spi.hpp
Oops, something went wrong.

0 comments on commit 90b160c

Please sign in to comment.