Depending on what else uses the SPI bus, it might be in a different mode when avrdude is run. This patch resets the mode SPI mode to mode0, 8 bit, and sets the bus speed on initialization. I've also moved the code to open the SPI device into the initialization, so the device isn't opened and closed 30,000 times per upload.
Depending on what else uses the SPI bus, it might be in a different mode when avrdude is run. This patch resets the mode SPI mode to mode0, 8 bit, and sets the bus speed on initialization. I've also moved the code to open the SPI device into the initialization, so the device isn't opened and closed 30,000 times per upload.
This addresses issue #7.