diff options
author | Josh Blum <josh@joshknows.com> | 2011-01-19 22:23:46 -0800 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2011-01-19 22:23:46 -0800 |
commit | 9239878b0b81c3a368bf11cfc2fe48bfb05ff902 (patch) | |
tree | f41a5e58eac89b35cb99537a0a0b64662384a9f2 /firmware/microblaze/usrp2p/spi_flash_private.h | |
parent | fc138381ee4bd8d191795230b7447071a85e1f28 (diff) | |
parent | 7d918c5f6acc9a5d2c8ae03e2e67b403f7efd5ff (diff) | |
download | uhd-9239878b0b81c3a368bf11cfc2fe48bfb05ff902.tar.gz uhd-9239878b0b81c3a368bf11cfc2fe48bfb05ff902.tar.bz2 uhd-9239878b0b81c3a368bf11cfc2fe48bfb05ff902.zip |
Merge branch 'next'
Conflicts:
host/lib/usrp/usrp2/codec_impl.cpp
Diffstat (limited to 'firmware/microblaze/usrp2p/spi_flash_private.h')
-rw-r--r-- | firmware/microblaze/usrp2p/spi_flash_private.h | 70 |
1 files changed, 0 insertions, 70 deletions
diff --git a/firmware/microblaze/usrp2p/spi_flash_private.h b/firmware/microblaze/usrp2p/spi_flash_private.h deleted file mode 100644 index 9a1b8d3e3..000000000 --- a/firmware/microblaze/usrp2p/spi_flash_private.h +++ /dev/null @@ -1,70 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2009 Free Software Foundation, Inc. - * Copyright 2009 Ettus Research LLC - * - * 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, either version 3 of the License, or - * (at your option) any later version. - * - * 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, see <http://www.gnu.org/licenses/>. - */ - -#ifndef INCLUDED_SPI_FLASH_PRIVATE_H -#define INCLUDED_SPI_FLASH_PRIVATE_H - -#include "spi_flash.h" -#include "spi.h" -#include "memory_map.h" -#include <string.h> - - -/* M25P64 et al. */ - -#define WREN_CMD 0x06 // write enable -#define WRDI_CMD 0x04 // write disable -#define RDID_CMD 0x9f // read identification -#define RDSR_CMD 0x05 // read status register -#define WRSR_CMD 0x01 // write status register -#define READ_CMD 0x03 -#define FAST_READ_CMD 0x0b -#define PP_CMD 0x02 // page program (256 bytes) -#define SE_CMD 0xd8 // sector erase (64KB) -#define BE_CMD 0xc7 // bulk erase (all) -#define RES_CMD 0xab // read electronic sig (deprecated) - -/* Status register bits */ - -#define SR_SRWD 0x80 -#define SR_BP2 0x10 // block protect bit 2 -#define SR_BP1 0x08 // block protect bit 1 -#define SR_BP0 0x04 // block protect bit 0 -#define SR_WEL 0x02 // Write Enable Latch -#define SR_WIP 0x01 // Write in Progress. Set if busy w/ program or erase cycle. - - -#define FLAGS (SPIF_PUSH_FALL | SPIF_LATCH_RISE) - -#define LEN(x) ((x) & SPI_CTRL_CHAR_LEN_MASK) - - -static inline uint32_t -min(uint32_t a, uint32_t b) -{ - return a < b ? a : b; -} - -static inline uint32_t -round_down(uint32_t x, uint32_t power_of_2) -{ - return x & -power_of_2; -} - -#endif /* INCLUDED_SPI_FLASH_PRIVATE_H */ |