feat(spi_slave): append trans_len field in trans_desc to show length actually transferred.

This commit is contained in:
michael
2017-09-30 19:59:05 +08:00
parent d3bb9de36a
commit 8e31a36562
3 changed files with 17 additions and 6 deletions
@@ -53,6 +53,7 @@ typedef struct {
*/
struct spi_slave_transaction_t {
size_t length; ///< Total data length, in bits
size_t trans_len; ///< Transaction data length, in bits
const void *tx_buffer; ///< Pointer to transmit buffer, or NULL for no MOSI phase
void *rx_buffer; ///< Pointer to receive buffer, or NULL for no MISO phase
void *user; ///< User-defined variable. Can be used to store eg transaction ID.