sdcard  1.5
Customations for HvA-Xmegaboard to SD-card library FatFs of Chan
mmc_avr.c File Reference

This is customized version of mmc_avr.c The original version is from sample avr release R0.11a. More...

Detailed Description

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:

  1. A static function sdspi_init() is added that initialize the SPI
  2. A static function sdspi_write_multi_byte() is added to write multiple bytes to the SPI
  3. A static function sdspi_read_multi_byte() is added to read multiple bytes from the SPI
  4. The static function power_on() is changed. It initislizes the SPI of port C in the Xmega-style. The power dectection is removed.
  5. The static function power_off() is changed. It disables the SPI of port C in the Xmega-style. The power detcetion is removed.
  6. The static function xchg_spi() is now an alias for sdspi_transfer_byte()
  7. The static function xmit_spi_multi() is now an alias for sdspi_write_multi_byte()
  8. The static function rcvr_spi_multi() is now an alias for sdspi_read_multi_byte()