Gunar Schorcht
bfc2a51f70
drivers/sdcard_spi: remove copy of sdcard_spi_params_t from device
...
It is not necessary to hold a complete copy `sdcard_spi_params_t` in the device descriptor. Constant parameters can be used directly from ROM instead. This saves 24 bytes of RAM.
2023-05-01 14:36:25 +02:00
Benjamin Valentin
f7197ba16a
drivers/sdcard_spi: make use of crc16_ccitt_false_update()
...
Use crc16_ccitt instead of ucrc16.
This can be speed up by using a look-up table if desired and does
not use more memory in the default configuration.
2022-10-20 00:43:27 +02:00
Karl Fessel
da51932737
boards: add some missing whitespaces for static tests
2022-09-14 15:11:14 +02:00
Marian Buschsieweke
b15af47f34
drivers/sdcard_spi: make 8-bit safe
...
- replace all `int`s and `unsigned`s with integers with fixed width
- replaced all signed integers of sizes with unsigned ones (sizes
cannot be negative)
- made bitshifts 8-bit safe (e.g. `1 << 24` is valid on 32-bit, but
undefined behavior on 8-bit, as a 16 bit wide `int` would be shifted
by more than the type width)
- use `void *` / `const void *` for data buffers to ease use
2022-09-11 10:27:40 +02:00
Francisco Molina
02ce15b2e9
drivers/scard_spi: _dyn_spi_rxtx_byte return void
...
Both _sw_spi_rxtx_byte and _hw_spi_rxtx_byte return always 1, so
having a return value and checking for it does not make sense,
instead return void and remove the checks
2022-04-20 14:54:36 +02:00
Benjamin Valentin
a0059eee43
drivers/sdcard_spi: be sure to always write state
2022-03-25 19:09:11 +01:00
Benjamin Valentin
63247d17c4
drivers/sdcard_spi: allow board to overwrite SD_CARD_SPI_SPEED_POSTINIT
...
Include board.h so we can overwrite SD_CARD_SPI_SPEED_POSTINIT there.
2022-03-11 11:59:40 +01:00
MrKevinWeiss
6434c8c328
drivers/sdcard_spi: Update kconfig model
2022-03-04 14:15:52 +01:00
9963e28d18
drivers/sdcard_spi: replace GPIO_UNDEF by SPI_CS_UNDEF
2022-01-04 12:53:02 +01:00
Francisco Molina
7cffaab47a
drivers/sdcard_spi: factorize timeout code
2021-12-09 14:00:39 +01:00
Francisco Molina
74fc764a41
drivers/sdcard_spi: convert to ztimer_usec
2021-12-09 08:02:06 +01:00
Francisco Molina
8a4e7bf7fe
drivers/sdcard_spi: uncrustify
2021-12-09 07:58:49 +01:00
Jan Romann
4384795cb9
treewide: Remove excessive newlines
2021-08-13 19:50:38 +02:00
Leandro Lanzieri
64c2594dee
drivers/sdcard_spi: add module to Kconfig
2020-11-27 09:20:08 +01:00
Bas Stottelaar
92b1dfc703
drivers/*: realign ENABLE_DEBUG
2020-10-23 01:26:09 +02:00
Gunar Schorcht
6d61381d2a
drivers: use inline functions for GPIO comparisons
...
The expandable GPIO API requires the comparison of structured GPIO types. This means that inline functions must be used instead of direct comparisons. For the migration process, drivers must first be changed so that they use the inline comparison functions.
2020-08-31 13:10:28 +02:00
304bce3724
drivers: configure per driver dependency resolution
2020-07-20 14:32:16 +02:00
490126cfa0
drivers: move USEMODULE_INCLUDES in each driver directories
2020-07-15 20:36:27 +02:00
Daniel Lockau
0d3dc120ef
drivers/sdcard_spi: remove auto-init
2020-07-09 08:50:53 +02:00
Benjamin Valentin
b5d711da25
drivers/sdcard_spi: document undocumented defines
...
Murdock enforces these now, so add documentation to make it happy.
2020-07-02 16:33:09 +02:00
Daniel Lockau
e7fbc174bc
drivers/sdcard_spi: make retries configurable
...
- convert count based retry implementation to timeout based
implementation
- allow user definition of retry parameters
2020-07-02 16:33:09 +02:00
Benjamin Valentin
f3e28c0350
drivers/sdcard_spi: make use of spi_deinit_pins()
...
Make sure to de-init the SPI bus before using the pins as GPIO.
Once all archs implement periph_spi_reconfigure, we can drop mosi,
miso and clk pins from the `card->params` and just use the bus
getter functions.
2020-06-21 21:21:39 +02:00
Gunar Schorcht
3542c7af0e
drivers/sdcard_spi: fix broken links
2020-03-24 10:38:40 +01:00
1d2dd2efdd
drivers/sdcard_spi: fix typos
2019-11-23 22:39:39 +01:00
Francois Berder
4a31f94cfc
many typo fixes
...
Signed-off-by: Francois Berder <18538310+francois-berder@users.noreply.github.com>
2019-11-23 22:39:07 +01:00
Frank Hessel
70ac451a2b
drivers/sdcard_spi: Use uint8_t for byte values
2019-04-29 19:25:34 +02:00
Kees Bakker
23e2859528
drivers/sdcard_spi: do normal assignment instead of memcpy
2019-01-10 19:43:44 +01:00
Gaëtan Harter
939ca4e1bf
drivers/sdcard_spi: fix uint64_t cast location
...
When compiling `tests/drivers_sdcard_spi` with `avr-gcc: avr-gcc (GCC) 6.4.0`
it detected this error
RIOT/drivers/sdcard_spi/sdcard_spi.c:1012:72:
error: result of '512 << 10' requires 21 bits to represent, but 'int' only has 16 bits [-Werror=shift-overflow=]
return (card->csd.v2.C_SIZE + 1) * (uint64_t)(SD_HC_BLOCK_SIZE << 10);
2018-08-09 09:12:23 +02:00
Gunar Schorcht
bd4661bc19
drivers/sdcard_spi: fix of #9667
2018-08-01 20:41:30 +02:00
bc66d987a9
drivers/sdcard_spi: use new driver params scheme
2018-02-28 17:43:28 +01:00
didile
32ae17256c
drivers/sdcard_spi: use of ucrc16 by default
...
Useless consts removed.
2018-02-26 19:43:13 +01:00
e72448703d
drivers: instead of cpp-style, use C-style comments
2018-02-06 16:59:58 +01:00
smlng
b283b7784c
make: fix various compile errors with Wextra
...
pkg, nordic_softdevice_ble: disable CFLAGS to omit compiler error
sys, pm_layered: fix casting nonscalar to the same type
cpu, stm32_common: fix type-limits, remove always true assert
cpu, stm32f4: fix pointer arithmetic in periph/i2c
drivers, at86rf2xx: fix type-limits where condition always true
saul, gpio: fix if no gpio configured for saul
cpu, saml21: add frequency check to periph/timer
driver, cc110x: fix unused param and type-limts errors
boards, wsn430-common: fix old-style-declaration
make: fix old style definition
drivers, sdcard_spi: fix old style typedef
driver, at30tse: remove unnecessary check
driver, nrf24: fix type-limit
driver, pn532: change buffer from char to uint8_t
tests/driver_sdcard: fix type limits
boards, feather-m0: add missing field inits
driver, tcs37727: fix type limits
pkg, emb6: disable some compiler warnings
tests/emb6: disable some compiler warings
pkg, openthread: fix sign compare and unused params
tests/trickle: fix struct init
tests/pthread_cooperation: fix type limits
board, mips-malta: remove feature periph_uart
shell: fix var size for netif command
gnrc, netif: fix sign-compare
gnrc, nib: fix sign-compare
shell: fix output in netif command
posix: fix type-limits in pthread_cond
2017-11-28 18:31:43 +01:00
smlng
e381317fbf
make: fix sign-compare errors
...
cpu, nrf5x_common: fix sign-compare in periph/flashpage
drivers, periph_common: fix sign-compare in flashpage
cpu, sam0_common: fix sign-compare error in periph/gpio
cpu, cc2538: fix sign-compare in periph/timer
cpu, sam3: fix sign-compare in periph/gpio
cpu, stm32_common: fix sign-compare in periph/pwm
cpu, stm32_common: fix sign-compare in periph/timer
cpu, stm32_common: fix sign-compare in periph/flashpage
cpu, nrf5x_common: fix sign-compare in radio/nrfmin
cpu, samd21: fix sign-compare in periph/pwm
cpu, ezr32wg: fix sign-compare in periph/gpio
cpu, ezr32wg: fix sign-compare in periph/timer
drivers, ethos: fix sign-compare
sys, net: fix sign-compare
cpu, atmega_common: fix sign-compare error
cpu, msp430fxyz: fix sign-compare in periph/gpio
boards, msb-430-common: fix sign-compare in board_init
driver, cc2420: fix sign-compared
sys/net: fix sign-compare in gnrc_tftp
driver, pcd8544: fix sign-compare
driver, pn532: fix sign-compare
driver, sdcard_spi: fix sign-compare
tests: fix sign_compare
sys/net, lwmac: fix sign_compare
pkg, lwip: fix sign-compare
boards, waspmote: make CORECLOCK unsigned long to fix sign_compare error
tests, sock_ip: fix sign compare
tests, msg_avail: fix sign compare
tests, sock_udp: fix sign compare
boards: fix sign-compare for calliope and microbit matrix
2017-11-28 11:55:48 +01:00
94c753c07a
drivers: doxygen cleanup
2017-09-01 15:12:20 +02:00
MichelRottleuthner
e5baef3810
Merge pull request #7324 from MichelRottleuthner/sdcard_mtd
...
sdcard_spi: integrate to mtd interface
2017-08-09 11:30:41 +02:00
Hauke Petersen
2b855a673d
drivers/sdcard_spi: remove xtimer_init
2017-06-06 16:36:02 +02:00
Hauke Petersen
24ceb954ea
drivers/sdcard_spi: adapted to SPI interface changes
2017-01-25 16:46:46 +01:00
Michel Rottleuthner
ac2ae7cb56
drivers: added driver for accessing sd_cards over spi
2017-01-20 18:11:26 +01:00