dsvensson / cc1101

A platform agnostic driver to interface with the CC1101 (Sub-1GHz RF Transceiver)
Apache License 2.0
29 stars 15 forks source link

Read Status Byte when communicating on SPI #40

Closed Andrei-Basarab closed 2 days ago

Andrei-Basarab commented 4 days ago

According to the CC1101 datasheet, chapter 10.1 Chip Status Byte

When the header byte, data byte, or command strobe is sent on the SPI interface, the chip status byte is sent by the CC1101 on the SO pin. The status byte contains key status signals, useful for the MCU.

dsvensson commented 4 days ago

Is the status byte really appropriate to give access to or should its meaning be conveyed via api behavior instead? Would be great if you could provide some psuedo code examples.

Andrei-Basarab commented 4 days ago
  1. There will be indirect access to the "status byte", given in a semantical way (not raw byte)
  2. If the user wishes, he can access the last Chip Status Byte after performing an SPI transaction (calling any functional lib's API)
  3. Reading the "status byte" in the "lowlevel" doesn't add much overhead, since the SPI already transferred us the status byte from CC1101
  4. As a device driver, (this repo) shall implement (ideally) all of the device's capabilities - "status byte" is one of them
  5. I will provide the implementation with upcoming PR
dsvensson commented 2 days ago

resolved via #41