Use SPI Macro for word length specification (improves readability)
authorNathael Pajani <nathael.pajani@ed3l.fr>
Thu, 24 Sep 2020 04:14:42 +0000 (06:14 +0200)
committerNathael Pajani <nathael.pajani@ed3l.fr>
Tue, 8 Nov 2022 16:03:05 +0000 (17:03 +0100)
extdrv/cc1101.c

index 21c49a1..ee0c677 100644 (file)
@@ -65,7 +65,7 @@ uint8_t cc1101_spi_transfer(uint8_t addr, uint8_t* out, uint8_t* in, uint8_t siz
        status = (uint8_t)spi_transfer_single_frame(cc1101.spi_num, (uint16_t)addr);
        /* Perform transfer */
        if (size != 0) {
-               spi_transfer_multiple_frames(cc1101.spi_num, out, in, size, 8);
+               spi_transfer_multiple_frames(cc1101.spi_num, out, in, size, LPC_SSP_WORD_LEN(8));
        }
        /* Release Chip select */
        gpio->set = (1 << cc1101.cs_pin.pin);