sdcard.py: Add SD card driver to the scripts directory
SD cards require to use FAT. Thus it was enabled here.
polarity and phase were assigned wrongly and evaluated wrong
firstbit keyword was evaluated wrong
use the same default values for make_new and init.
No default assignment of the cs Pin
This removes the default assignment of PB_15 to the cs pin.
As a result, cs will not be pulled automatically. If that is
wanted, assign cs in the SPI constructor or spi.init() call.
Without the automatic cs assignment, the drivers for SD-Card and spi
flash work with the hard SPI and not Pin has to be salvaged.
The old code is kept as commented line.
Add write_readinto support to the SDK supporting the respective
Python method. This required a change to wm_hostspi.c
Since the original SDK should not be touched, I copied the required
files into the Micropython branch, which is the second best option.
sdcard.py: Add SD card driver to the scripts directory SD cards require to use FAT. Thus it was enabled here.
polarity and phase were assigned wrongly and evaluated wrong
firstbit keyword was evaluated wrong
use the same default values for make_new and init.
No default assignment of the cs Pin This removes the default assignment of PB_15 to the cs pin. As a result, cs will not be pulled automatically. If that is wanted, assign cs in the SPI constructor or spi.init() call. Without the automatic cs assignment, the drivers for SD-Card and spi flash work with the hard SPI and not Pin has to be salvaged. The old code is kept as commented line.
Add write_readinto support to the SDK supporting the respective Python method. This required a change to wm_hostspi.c Since the original SDK should not be touched, I copied the required files into the Micropython branch, which is the second best option.
The driver for the SD card is part of this commit. The driver for SPI-flash can be found here, subdir flash: https://github.com/peterhinch/micropython_eeprom.git