@@ -114,7 +114,8 @@ bool Adafruit_SPIDevice::begin(void) {
114
114
}
115
115
116
116
/* !
117
- * @brief Transfer (send/receive) one byte over hard/soft SPI
117
+ * @brief Transfer (send/receive) a buffer over hard/soft SPI, without
118
+ * transaction management
118
119
* @param buffer The buffer to send and receive at the same time
119
120
* @param len The number of bytes to transfer
120
121
*/
@@ -251,7 +252,8 @@ void Adafruit_SPIDevice::transfer(uint8_t *buffer, size_t len) {
251
252
}
252
253
253
254
/* !
254
- * @brief Transfer (send/receive) one byte over hard/soft SPI
255
+ * @brief Transfer (send/receive) one byte over hard/soft SPI, without
256
+ * transaction management
255
257
* @param send The byte to send
256
258
* @return The byte received while transmitting
257
259
*/
@@ -281,7 +283,8 @@ void Adafruit_SPIDevice::endTransaction(void) {
281
283
}
282
284
283
285
/* !
284
- * @brief Write a buffer or two to the SPI device.
286
+ * @brief Write a buffer or two to the SPI device, with transaction
287
+ * management.
285
288
* @param buffer Pointer to buffer of data to write
286
289
* @param len Number of bytes from buffer to write
287
290
* @param prefix_buffer Pointer to optional array of data to write before
@@ -347,7 +350,8 @@ bool Adafruit_SPIDevice::write(const uint8_t *buffer, size_t len,
347
350
}
348
351
349
352
/* !
350
- * @brief Read from SPI into a buffer from the SPI device.
353
+ * @brief Read from SPI into a buffer from the SPI device, with transaction
354
+ * management.
351
355
* @param buffer Pointer to buffer of data to read into
352
356
* @param len Number of bytes from buffer to read.
353
357
* @param sendvalue The 8-bits of data to write when doing the data read,
@@ -386,9 +390,9 @@ bool Adafruit_SPIDevice::read(uint8_t *buffer, size_t len, uint8_t sendvalue) {
386
390
}
387
391
388
392
/* !
389
- * @brief Write some data, then read some data from SPI into another buffer.
390
- * The buffers can point to same/overlapping locations. This does not
391
- * transmit-receive at the same time!
393
+ * @brief Write some data, then read some data from SPI into another buffer,
394
+ * with transaction management. The buffers can point to same/overlapping
395
+ * locations. This does not transmit-receive at the same time!
392
396
* @param write_buffer Pointer to buffer of data to write from
393
397
* @param write_len Number of bytes from buffer to write.
394
398
* @param read_buffer Pointer to buffer of data to read into.
@@ -462,9 +466,9 @@ bool Adafruit_SPIDevice::write_then_read(const uint8_t *write_buffer,
462
466
463
467
/* !
464
468
* @brief Write some data and read some data at the same time from SPI
465
- * into the same buffer. This is basicaly a wrapper for transfer() with
466
- * CS-pin and transaction management.
467
- * This /does/ transmit-receive at the same time!
469
+ * into the same buffer, with transaction management . This is basicaly a wrapper
470
+ * for transfer() with CS-pin and transaction management. This /does/
471
+ * transmit-receive at the same time!
468
472
* @param buffer Pointer to buffer of data to write/read to/from
469
473
* @param len Number of bytes from buffer to write/read.
470
474
* @return Always returns true because there's no way to test success of SPI
@@ -486,6 +490,10 @@ bool Adafruit_SPIDevice::write_and_read(uint8_t *buffer, size_t len) {
486
490
return true ;
487
491
}
488
492
493
+ /* !
494
+ * @brief Assert/Deassert the CS pin if it is defined
495
+ * @param value The state the CS is set to
496
+ */
489
497
void Adafruit_SPIDevice::setChipSelect (int value) {
490
498
if (_cs == -1 )
491
499
return ;
0 commit comments