X-Git-Url: https://review.openocd.org/gitweb?a=blobdiff_plain;f=src%2Fflash%2Fnor%2Fspi.h;h=a1849983f26db9e16603cb22dfdfc2ad6d3a7a0b;hb=790a7b2a8d22e04d9447d35d3bbb8684a11446a3;hp=319b00b90d9dcb7d5455510f2d9de4c35695a0e6;hpb=15e19011eae841ca4688f1a6053a4d76419bf10e;p=openocd.git diff --git a/src/flash/nor/spi.h b/src/flash/nor/spi.h index 319b00b90d..a1849983f2 100644 --- a/src/flash/nor/spi.h +++ b/src/flash/nor/spi.h @@ -16,11 +16,12 @@ * 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. * + * along with this program. If not, see . * ***************************************************************************/ +#ifndef OPENOCD_FLASH_NOR_SPI_H +#define OPENOCD_FLASH_NOR_SPI_H + /* data structure to maintain flash ids from different vendors */ struct flash_device { char *name; @@ -43,7 +44,7 @@ struct flash_device { .size_in_bytes = size \ } -extern struct flash_device flash_devices[]; +extern const struct flash_device flash_devices[]; /* fields in SPI flash status register */ #define SPIFLASH_BSY_BIT 0x00000001 /* WIP Bit of SPI SR on SMI SR */ @@ -56,3 +57,5 @@ extern struct flash_device flash_devices[]; #define SPIFLASH_PAGE_PROGRAM 0x02 /* Page Program */ #define SPIFLASH_FAST_READ 0x0B /* Fast Read */ #define SPIFLASH_READ 0x03 /* Normal Read */ + +#endif /* OPENOCD_FLASH_NOR_SPI_H */