X-Git-Url: https://review.openocd.org/gitweb?p=openocd.git;a=blobdiff_plain;f=ecosflash%2Fflash.c;h=c8ac353f4996f4d891da6a2189978c33ce686664;hp=0bbda7bc850603d15c1d35e453dc36ead4e5113e;hb=3d2305f2e6a55912d5851c0dbed886d913a4d015;hpb=8e7d9cb3bc9d00470d0fc398cd576db28c29b95d diff --git a/ecosflash/flash.c b/ecosflash/flash.c index 0bbda7bc85..c8ac353f49 100644 --- a/ecosflash/flash.c +++ b/ecosflash/flash.c @@ -1,22 +1,34 @@ -/*************************************************************************** - * Copyright (C) 2008 Øyvind Harboe * - * oyvind.harboe@zylin.com * - * * - * 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; 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 * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * - ***************************************************************************/ +/* +#####ECOSGPLCOPYRIGHTBEGIN#### +## ------------------------------------------- +## This file is part of eCos, the Embedded Configurable Operating System. +## Copyright (C) 2008 Øyvind Harboe +## +## eCos 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; either version 2 or (at your option) any later version. +## +## eCos is distributed in the hope that it will be useful, but WITHOUT ANY +## WARRANTY; without even the implied warranty of MERCHANTABILITY or +## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +## for more details. +## +## You should have received a copy of the GNU General Public License along +## with eCos; if not, write to the Free Software Foundation, Inc., +## 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. +## +## As a special exception, if other files instantiate templates or use macros +## or inline functions from this file, or you compile this file and link it +## with other works to produce a work based on this file, this file does not +## by itself cause the resulting work to be covered by the GNU General Public +## License. However the source code for this file must still be made available +## in accordance with section (3) of the GNU General Public License. +## +## This exception does not invalidate any other reasons why a work based on +## this file might be covered by the GNU General Public License. +## ------------------------------------------- +#####ECOSGPLCOPYRIGHTEND#### +*/ #include #define _FLASH_PRIVATE_ @@ -41,7 +53,7 @@ int init() *t=0; } return flash_init((_printf *)&myprintf); - + } @@ -56,15 +68,15 @@ int checkFlash(void *addr, int len) } -int erase(void *address, int len) +int erase(void *address, int len) { int retval; void *failAddress; - + retval=checkFlash(address, len); if (retval!=0) return retval; - + retval=init(); if (retval!=0) return retval; @@ -76,14 +88,14 @@ int erase(void *address, int len) extern char _end; // Data follows immediately after program, long word aligned. -int program(void *buffer, void *address, int len) +int program(void *buffer, void *address, int len) { int retval; void *failAddress; retval=checkFlash(address, len); if (retval!=0) return retval; - + retval=init(); if (retval!=0) return retval;