comparison packages/redboot/current/src/flash.c @ 2817:6e1e5c6da98e

* src/flash.c (do_flash_init): Update for minor flash API mod to call cyg_flash_set_global_printf() to set printf function.
author jlarmour
date Thu, 19 Feb 2009 00:16:37 +0000
parents 74dbf4c3f2e1
children fd8b19601f7d
comparison
equal deleted inserted replaced
2816:422d0a343b4d 2817:6e1e5c6da98e
6 // 6 //
7 //========================================================================== 7 //==========================================================================
8 // ####ECOSGPLCOPYRIGHTBEGIN#### 8 // ####ECOSGPLCOPYRIGHTBEGIN####
9 // ------------------------------------------- 9 // -------------------------------------------
10 // This file is part of eCos, the Embedded Configurable Operating System. 10 // This file is part of eCos, the Embedded Configurable Operating System.
11 // Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 11 // Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
12 // 12 //
13 // eCos is free software; you can redistribute it and/or modify it under 13 // eCos is free software; you can redistribute it and/or modify it under
14 // the terms of the GNU General Public License as published by the Free 14 // the terms of the GNU General Public License as published by the Free
15 // Software Foundation; either version 2 or (at your option) any later 15 // Software Foundation; either version 2 or (at your option) any later
16 // version. 16 // version.
1859 1859
1860 1860
1861 1861
1862 if (!__flash_init) { 1862 if (!__flash_init) {
1863 __flash_init = 1; 1863 __flash_init = 1;
1864 1864
1865 if ((stat = cyg_flash_init(diag_printf)) != 0) { 1865 cyg_flash_set_global_printf((cyg_flash_printf *)&diag_printf);
1866 if ((stat = cyg_flash_init()) != 0) {
1866 diag_printf("FLASH: driver init failed: %s\n", cyg_flash_errmsg(stat)); 1867 diag_printf("FLASH: driver init failed: %s\n", cyg_flash_errmsg(stat));
1867 return -1; 1868 return -1;
1868 } 1869 }
1869 1870
1870 #ifdef CYGNUM_REDBOOT_FLASH_BASE 1871 #ifdef CYGNUM_REDBOOT_FLASH_BASE