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

Subversion Repositories xenie

[/] [xenie/] [trunk/] [examples/] [Eth_example/] [mb_fw/] [xenie_eth_test_womtd/] [src/] [spansion_flash.h] - Blame information for rev 13

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 4 DFC
/******************************************************************************
2
**
3
** (C) Copyright 2017 DFC Design, s.r.o., Brno, Czech Republic
4
** Author: Marek Kvas (m.kvas@dspfpga.com)
5
**
6
****************************************************************************
7
**
8
** This file is part of Xenia Ethernet Example project.
9
**
10
** Xenia Ethernet Example project is free software: you can
11
** redistribute it and/or modify it under the terms of
12
** the GNU Lesser General Public License as published by the Free
13
** Software Foundation, either version 3 of the License, or
14
** (at your option) any later version.
15
**
16
** Xenia Ethernet Example project is distributed in the hope that
17
** it will be useful, but WITHOUT ANY WARRANTY; without even
18
** the implied warranty of MERCHANTABILITY or FITNESS FOR A
19
** PARTICULAR PURPOSE.  See the GNU Lesser General Public License
20
** for more details.
21
**
22
** You should have received a copy of the GNU Lesser General Public
23
** License along with Xenia Ethernet Example project.  If not,
24
** see <http://www.gnu.org/licenses/>.
25
****************************************************************************
26
*/
27
 
28
#ifndef __SPANSION_FLASH_H__
29
#define __SPANSION_FLASH_H__
30
 
31
#include <xspi.h>
32
 
33
/*
34
 * Number of bytes per page in the flash device.
35
 */
36
#define SPANSION_FLASH_PAGE_SIZE                256
37
#define SPANSION_FLASH_BUF_OVERHEAD             8
38
 
39
struct spansion_flash {
40
        XSpi  *spi;
41
        uint32_t slave_select;
42
};
43
 
44
 
45
int spansion_flash_init (struct spansion_flash *sf, XSpi *spi, int slave_num);
46
int spansion_flash_quad_io_read(struct spansion_flash *sf, uint32_t flash_addr, uint8_t *buf, int len);
47
int spansion_flash_quad_mode(struct spansion_flash *sf);
48
int spansion_flash_quad_io_read(struct spansion_flash *sf, uint32_t flash_addr, uint8_t *buf, int len);
49
 
50
#endif

powered by: WebSVN 2.1.0

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