This is customized version of mmc_avr.c The original version is from sample avr release R0.11a.
- Date
- 11 march 2020 (previous released 2016)
It is modified by Wim Dolman (w.e.dolman@hva.nl) for the HvA-Xmegaboard version 2 The most important global changes are:
- It is suitable for the ATxmega256a3u.
- It uses the Xmega style (DIRSET, OUTSET, ...).
- It uses SPIC with a remap of (SCK and MOSI) in stead of bit banging.
The most important detailed changes are:
- A static function sdspi_init() is added that initialize the SPI
- A static function sdspi_write_multi_byte() is added to write multiple bytes to the SPI
- A static function sdspi_read_multi_byte() is added to read multiple bytes from the SPI
- The static function power_on() is changed. It initislizes the SPI of port C in the Xmega-style. The power dectection is removed.
- The static function power_off() is changed. It disables the SPI of port C in the Xmega-style. The power detcetion is removed.
- The static function xchg_spi() is now an alias for sdspi_transfer_byte()
- The static function xmit_spi_multi() is now an alias for sdspi_write_multi_byte()
- The static function rcvr_spi_multi() is now an alias for sdspi_read_multi_byte()