OpenCores
URL https://opencores.org/ocsvn/xulalx25soc/xulalx25soc/trunk

Subversion Repositories xulalx25soc

[/] [xulalx25soc/] [trunk/] [sw/] [flashdrvr.h] - Blame information for rev 45

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 29 dgisselq
////////////////////////////////////////////////////////////////////////////////
2
//
3
// Filename:    flashdrvr.h
4
//
5
// Project:     XuLA2-LX25 System on a Chip
6
//
7
// Purpose:     Flash driver.  Encapsulate writing to the flash device.
8
//
9
// Creator:     Dan Gisselquist
10
//              Gisselquist Tecnology, LLC
11
//
12
////////////////////////////////////////////////////////////////////////////////
13
//
14
// Copyright (C) 2016, Gisselquist Technology, LLC
15
//
16
// This program is free software (firmware): you can redistribute it and/or
17
// modify it under the terms of  the GNU General Public License as published
18
// by the Free Software Foundation, either version 3 of the License, or (at
19
// your option) any later version.
20
//
21
// This program is distributed in the hope that it will be useful, but WITHOUT
22
// ANY WARRANTY; without even the implied warranty of MERCHANTIBILITY or
23
// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
24
// for more details.
25
//
26
// License:     GPL, v3, as defined and found on www.gnu.org,
27
//              http://www.gnu.org/licenses/gpl.html
28
//
29
//
30
////////////////////////////////////////////////////////////////////////////////
31
//
32
//
33
//
34
#ifndef FLASHDRVR_H
35
#define FLASHDRVR_H
36
 
37
#include "regdefs.h"
38
 
39
class   FLASHDRVR {
40
private:
41
        DEVBUS  *m_fpga;
42
 
43
        void    flwait(void);
44
public:
45
        FLASHDRVR(DEVBUS *fpga) : m_fpga(fpga) {}
46
        bool    erase_sector(const unsigned sector, const bool verify_erase=true);
47
        bool    write_page(const unsigned addr, const unsigned len,
48
                        const unsigned *data, const bool verify_write=true);
49
        bool    write(const unsigned addr, const unsigned len,
50
                        const unsigned *data, const bool verify=false);
51
};
52
 
53
#endif

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.