2025-07-12 10:25:35 -07:00

34 lines
1.1 KiB
C

// SPDX-License-Identifier: GPL-2.0-only
/* This file is part of a4092flash
* Copyright (C) 2023 Matthew Harlum <matt@harlum.net>
*
* 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; version 2.
*
* 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef FLASH_H
#define FLASH_H
#include <exec/types.h>
#include <stdbool.h>
void flash_unlock_sdp();
void flash_erase_chip();
UBYTE flash_readByte(ULONG);
void flash_writeByte(ULONG, UBYTE);
bool flash_init(UBYTE *, UBYTE *, ULONG *, UWORD *);
void flash_erase_sector(ULONG);
void flash_erase_bank(UWORD);
#endif