Skip to content

Commit

Permalink
Fixed style issues
Browse files Browse the repository at this point in the history
Signed-off-by: Sergio R. Caprile <[email protected]>
  • Loading branch information
scaprile committed Oct 26, 2020
1 parent b97d1a7 commit d533ae6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
8 changes: 2 additions & 6 deletions src/esp32/esp32_spi_master.c
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,7 @@ static void esp32_spi_get_rx_data(spi_dev_t *dev, uint8_t *data, size_t skip,
if (skip > 0) {
skip--;
} else {
if (NULL != data) {
data[i] = byte;
}
if (data != NULL) data[i] = byte;
++i;
}
w >>= 8;
Expand Down Expand Up @@ -317,9 +315,7 @@ static bool mgos_spi_run_txn_fd(struct mgos_spi *c, const void *tx_data,
}
esp32_spi_get_rx_data(dev, rxdp, 0, dlen);
txdp += dlen;
if (NULL != rxdp) {
rxdp += dlen;
}
if (rxdp != NULL) rxdp += dlen;
}

return true;
Expand Down
4 changes: 1 addition & 3 deletions src/stm32/stm32_spi_master_gspi.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,7 @@ bool stm32_gspi_run_txn_fd(struct mgos_spi *c, const struct mgos_spi_txn *txn) {
if (c->debug) {
LOG(LL_DEBUG, ("read 0x%02x", byte));
}
if(!discard_rx) {
*rx_data++ = byte;
}
if (!discard_rx) *rx_data++ = byte;
}
len--;
}
Expand Down

0 comments on commit d533ae6

Please sign in to comment.