Fixed AVRISP programmer demo -- can now connect to a target and read/write Sig/Lock/Fuse/OSCCAL bytes successfully.

Changed SPI_Init() to allow for the clock polarity and data sample modes to be set.

Changed Dataflash_Init() to no longer call SPI_Init() automatically.
This commit is contained in:
Dean Camera 2009-08-23 08:37:11 +00:00
parent 1e8df8951a
commit f229502d9a
9 changed files with 58 additions and 63 deletions

View file

@ -84,7 +84,8 @@ void SetupHardware(void)
/* Hardware Initialization */
LEDs_Init();
Dataflash_Init(SPI_SPEED_FCPU_DIV_2);
SPI_Init(SPI_SPEED_FCPU_DIV_2 | SPI_SCK_LEAD_FALLING | SPI_SAMPLE_TRAILING | SPI_MODE_MASTER);
Dataflash_Init();
USB_Init();
/* Clear Dataflash sector protections, if enabled */