1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-12 19:10:32 +03:00

clarifications after code review.

This commit is contained in:
Matthew Selby 2025-07-10 12:53:20 +01:00
parent 7691ea85f4
commit 96bd3c3405
2 changed files with 5 additions and 5 deletions

View file

@ -503,9 +503,9 @@ static void spiPreInitStream(const extDevice_t *dev)
{
// Prepare the init structure for the next segment to reduce inter-segment interval
// (if it's a "buffers" segment, not a "link" segment).
busSegment_t *segment = (busSegment_t *)dev->bus->curSegment + 1;
if (segment->len > 0) {
spiInternalInitStream(dev, segment);
busSegment_t *nextSegment = (busSegment_t *)dev->bus->curSegment + 1;
if (nextSegment->len > 0) {
spiInternalInitStream(dev, nextSegment);
}
}

View file

@ -357,8 +357,8 @@ void spiInternalInitStream(const extDevice_t *dev, volatile busSegment_t *segmen
// To keep everything uniform (always both TX and RX channels active, callback always on RX completion), if there is
// no TX or RX buffer to read from / write to, treat as a single dummy byte with no increment.
// (cf. same idea on other platform implementations)
bool isTX = segment->u.buffers.txData;
bool isRX = segment->u.buffers.rxData;
bool isTX = segment->u.buffers.txData != NULL;
bool isRX = segment->u.buffers.rxData != NULL;
dma_channel_config config = dma_channel_get_default_config(bus->dmaTx->channel);
channel_config_set_transfer_data_size(&config, DMA_SIZE_8);