1
0
mirror of https://git.code.sf.net/p/openocd/code synced 2024-11-22 16:36:25 +00:00
openocd/contrib/loaders/flash/at91sam7x/samflash.h
Antonio Borneo a126229dff contrib: replace the GPLv2-or-later license tag
Replace the GPLv2-or-later boilerplate with the SPDX tag.

The SPDX tag on files *.c is incorrect, as it should use the C99
single line comment using '//'. But current checkpatch doesn't
allow C99 comments, so keep using standard C comments, by now.

Change-Id: I380d552940f1c405309a3346454251c0e80b5a45
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7159
Tested-by: jenkins
2022-09-13 22:06:14 +00:00

36 lines
971 B
C

/* SPDX-License-Identifier: GPL-2.0-or-later */
/***************************************************************************
* Copyright (C) 2007 by Pavel Chromy *
* chromy@asix.cz *
***************************************************************************/
#ifndef samflashH
#define samflashH
#include "platform.h"
#define FLASH_AREA_ADDR 0x100000
#define FLASH_STAT_OK 0
#define FLASH_STAT_PROGE 1
#define FLASH_STAT_LOCKE 2
#define FLASH_STAT_VERIFE 3
#define FLASH_STAT_INITE 4
extern unsigned int flash_page_count;
extern unsigned int flash_page_size; /* words */
/* detect chip and set loader parameters */
int flash_init(void);
/* program single flash page */
int flash_page_program(uint32 *data, int page_num);
/* erase whole chip */
int flash_erase_all(void);
/* verify written data */
int flash_verify(uint32 adr, unsigned int len, uint8 *src);
#endif