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

Subversion Repositories openarty

[/] [openarty/] [trunk/] [sw/] [host/] [flashdrvr.h] - Blame information for rev 4

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

Line No. Rev Author Line
1 4 dgisselq
//
2
//
3
// Filename:    flashdrvr.h
4
//
5
// Project:     FPGA library development (Basys3 development board)
6
//
7
// Purpose:     Flash driver.  Encapsulate writing to the flash device.
8
//
9
// Creator:     Dan Gisselquist
10
//              Gisselquist Tecnology, LLC
11
//
12
// Copyright:   2015
13
//
14
//
15
#ifndef FLASHDRVR_H
16
#define FLASHDRVR_H
17
 
18
#include "regdefs.h"
19
 
20
class   FLASHDRVR {
21
private:
22
        DEVBUS  *m_fpga;
23
 
24
        void    flwait(void);
25
public:
26
        FLASHDRVR(DEVBUS *fpga) : m_fpga(fpga) {}
27
        bool    erase_sector(const unsigned sector, const bool verify_erase=true);
28
        bool    write_page(const unsigned addr, const unsigned len,
29
                        const unsigned *data, const bool verify_write=true);
30
        bool    write(const unsigned addr, const unsigned len,
31
                        const unsigned *data, const bool verify=false);
32
};
33
 
34
#endif

powered by: WebSVN 2.1.0

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