kcuzner / avrdude

avrdude with a Linux SPI programmer type
http://kevincuzner.com/2013/05/27/raspberry-pi-as-an-avr-programmer/
107 stars 68 forks source link

Set SPI mode and speed on initialization #9

Open CapnBry opened 8 years ago

CapnBry commented 8 years ago

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.