altos/chaoskey-v1.0: Add endpoint for reading flash contents
[fw/altos] / src / drivers / ao_25lc1024.c
index b25d52c4e7e7e529325ca84ce056885c3485dd2f..a9c897b3154f8d26f97e5bfec2deee746d637306 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -50,7 +51,7 @@ static __xdata uint8_t ao_ee_mutex;
        _asm nop _endasm; \
 } while(0)
 
-#define ao_ee_cs_low() ao_spi_get_bit(EE_CS_PORT, EE_CS_PIN, EE_CS, AO_EE_SPI_BUS)
+#define ao_ee_cs_low() ao_spi_get_bit(EE_CS_PORT, EE_CS_PIN, EE_CS, AO_EE_SPI_BUS, AO_SPI_SPEED_FAST)
 
 #define ao_ee_cs_high()        ao_spi_put_bit(EE_CS_PORT, EE_CS_PIN, EE_CS, AO_EE_SPI_BUS)
 
@@ -236,5 +237,5 @@ void
 ao_storage_device_init(void)
 {
        /* set up CS */
-       ao_enable_output(EE_CS_PORT, EE_CS_PIN,1);
+       ao_enable_output(EE_CS_PORT, EE_CS_PIN, EE_CS, 1);
 }