changeset 2142:a7557f72de47

* src/flash.c (flash_init): Allow repeat calls change the function used for printing. There are times you don't any output, eg you are downloading am image over the serial port.
author asl
date Sat, 25 Feb 2006 14:07:43 +0000
parents 3b32d18684cf
children 247a73554cd0
files packages/io/flash/current/ChangeLog packages/io/flash/current/src/flash.c
diffstat 2 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/packages/io/flash/current/ChangeLog
+++ b/packages/io/flash/current/ChangeLog
@@ -1,3 +1,10 @@
+2006-02-21  Oliver Munz  <munz@speag.ch>
+	    Andrew Lunn  <andrew.lunn@ascom.ch>
+
+	* src/flash.c (flash_init): Allow repeat calls change the function
+	used for printing. There are times you don't any output, eg you
+	are downloading am image over the serial port.
+
 2005-08-02  Andrew Lunn  <andrew.lunn@ascom.ch>
 
 	* tests/flash1.c (cyg_start): Compiler warning fixes.
--- a/packages/io/flash/current/src/flash.c
+++ b/packages/io/flash/current/src/flash.c
@@ -87,8 +87,9 @@ flash_init(_printf *pf)
 {
     int err;
 
+    flash_info.pf = pf; // Do this before calling into the driver
     if (flash_info.init) return FLASH_ERR_OK;
-    flash_info.pf = pf; // Do this before calling into the driver
+
     if ((err = flash_hwr_init()) != FLASH_ERR_OK) {
         return err;
     }