1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
Commit Graph

33 Commits

Author SHA1 Message Date
Marian Buschsieweke
87abafb13f
drivers/periph_spi: Add spi_transfer_u16_be()
This adds a helper function to exchange a 16 bit number that is to
be transferred in big endian order on the wire.
2024-02-02 13:05:02 +01:00
Benjamin Valentin
fbeb1f9a26 drivers/periph/spi: move DMA threshold to common code 2023-12-23 17:35:29 +01:00
Benjamin Valentin
6e7d5ae2d3 codespell: fix remaining issues 2022-09-16 14:00:35 +02:00
Francisco Molina
579ca6d941 drivers/periph_spi: spi_init_with_gpio_mode mode by reference 2022-01-18 16:22:18 +01:00
Benjamin Valentin
1768e93710 drivers/periph: use uint_fast8_t as default type
The default driver type is just an index into a device array defined
by the board.

If a platform wants to encode additional information in the device type,
it can define a custom type.

This means we can just set the default type to whatever fits the target
CPU best.

On ARM this will still be a 32 bit word, but on AVR it will by a 8 bit byte.
2021-11-18 10:29:50 +01:00
Marian Buschsieweke
9e5f7b6797
drivers/periph_spi: make spi_acquire() return void
There is no way to properly handle incorrect SPI parameters at run time, so
just having an assertion blow up is the better choice here.

As most instances of `spi_acquire()` don't check the return value anyway, this
will improve debugging experience quite a bit. Some implementation of
spi_acquire() don't even check parameters anyway.
2021-08-06 12:46:57 +02:00
Marian Buschsieweke
40859b61f0
drivers/periph_spi: fix Doxygen commands
use @retval to document individual return values rather than @return
2021-03-17 10:34:20 +01:00
Marian Buschsieweke
ae79f5fc59
drivers/periph/spi: clean up error codes and doc
- Use negative errno as error codes, rather than home-grown enums
    - Update the home-grown enum with negative errno codes for backward
      compatibility and mark it deprecated
- Update API doc to use negative errno codes
- Fix various style issues in Doxygen doc
    - Use `@retval` to document specific return values instead of abusing
      `@return` for this
    - Align parameters to proper indent level
2021-02-01 11:02:14 +01:00
Benjamin Valentin
896fcd43b0 drivers/periph/spi: add periph_spi_reconfigure feature 2020-06-21 21:19:17 +02:00
Hauke Petersen
4914e6484a periph/spi: add doc on low power implications 2019-10-01 23:09:23 +02:00
Dylan Laduranty
513b767694
Merge pull request #11944 from benpicco/spi_doc-fix
drivers/include/periph/spi: fix documentation
2019-09-12 21:28:21 +02:00
e42307188c
drivers/spi: extend API with updatable gpio mode on pins 2019-08-05 16:46:41 +02:00
Benjamin Valentin
870f5a5a0b drivers/include/periph/spi: fix documentation
spi_transfer_reg() will *always* send out a byte, even if the byte is '0'.

fixes #11763
2019-07-31 13:27:47 +02:00
Marc Poulhiès
dcff98ef56 drivers/include/periph/spi: Typo fix
Fix typo in inline doc.
2017-02-07 16:59:33 +01:00
Marc Poulhiès
56bd36b55b spi: doc typo 2017-01-30 13:26:01 +01:00
Hauke Petersen
37e0482e35 drivers/periph: remodeled SPI driver interface 2017-01-25 16:46:04 +01:00
Hauke Petersen
49ac533eba drivers/spi: made conf and speed types overridable 2016-03-09 17:59:25 +01:00
Hauke Petersen
77b790375f drivers/periph: some doxygen fixes
- added todos to periph module description
- repaired group names (e.g. s/driver_xx/drivers_xx/)
2015-11-19 15:57:36 +01:00
Hauke Petersen
bf4733fd88 drivers/periph/spi: added missing stdint.h include 2015-04-16 18:09:32 +02:00
Alexandru Caciulescu
451bf78549 drivers/include/periph: Repair header file include guards 2015-03-24 17:55:42 +02:00
Joakim Gebart
cc7acaaef0 periph/spi: Update clock polarity and phase documentation for clarity.
Signed-off-by: Joakim Gebart <joakim.gebart@eistec.se>
2015-01-22 09:03:44 +01:00
Hauke Petersen
3439247248 drivers/periph/spi: added locking mechanism 2015-01-17 15:13:51 +01:00
Ludwig Ortmann
da43a5e7a4 doc: periph: various fixes and cleanup
- unify file/module @brief
- distinct @file section more visibly in source
- provide missing @brief's
- move module details/notes from file to module sections
- provide missing macro definition for building
2014-12-04 10:28:45 +01:00
Ludwig Ortmann
5523ec67f3 doc: make peripheral interfaces modules
also remove `@file` parameters
2014-10-25 15:37:04 +02:00
BytesGalore
f94623ae0f drivers: add extern "C" to header files 2014-10-21 15:30:03 +02:00
Fabian Nack
be5f175623 drivers - spi: extended low-level spi driver interface 2014-10-16 17:10:11 +02:00
Hauke Petersen
413bc42c98 [SQUASH ME] added begin_transaction, fixed doc 2014-07-25 00:00:35 +02:00
Hauke Petersen
ebf4bd98a2 [SQUASH ME] fixed signature of spi_transfer_reg() 2014-07-24 22:55:17 +02:00
Hauke Petersen
f1865f034d [SQUASH ME] removed UNDEFINED from device list 2014-07-24 21:40:01 +02:00
Hauke Petersen
fdbfe36d68 [SQUASH ME] added fixed speed values 2014-07-24 21:37:01 +02:00
Hauke Petersen
4513eb7f77 driver: updated SPI driver interface 2014-07-24 21:37:01 +02:00
Hauke Petersen
d7fe933fe6 drivers: fixes to the SPI low-level interface 2014-07-24 21:37:01 +02:00
Hauke Petersen
e5ae56323e drivers: Initial import of SPI low-level driver IF 2014-07-24 21:37:01 +02:00