2015-07-30 12:41:33 -04:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2015 Jared Boone, ShareBrained Technology, Inc.
|
|
|
|
*
|
|
|
|
* This file is part of PortaPack.
|
|
|
|
*
|
|
|
|
* 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 2, 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; see the file COPYING. If not, write to
|
|
|
|
* the Free Software Foundation, Inc., 51 Franklin Street,
|
|
|
|
* Boston, MA 02110-1301, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __SPI_IMAGE_H__
|
|
|
|
#define __SPI_IMAGE_H__
|
|
|
|
|
|
|
|
#include <cstdint>
|
|
|
|
#include <cstddef>
|
|
|
|
|
2015-08-20 20:11:08 -04:00
|
|
|
#include "memory_map.hpp"
|
2015-07-30 12:41:33 -04:00
|
|
|
|
|
|
|
namespace portapack {
|
|
|
|
namespace spi_flash {
|
|
|
|
|
|
|
|
struct region_t {
|
|
|
|
const size_t offset;
|
|
|
|
const size_t size;
|
|
|
|
|
2015-08-20 20:11:08 -04:00
|
|
|
constexpr const void* base() {
|
|
|
|
return reinterpret_cast<void*>(portapack::memory::map::spifi_cached.base() + offset);
|
2015-07-30 12:41:33 -04:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
constexpr region_t bootstrap {
|
|
|
|
.offset = 0x00000,
|
|
|
|
.size = 0x10000,
|
|
|
|
};
|
|
|
|
|
|
|
|
constexpr region_t hackrf {
|
2015-07-30 13:01:12 -04:00
|
|
|
.offset = 0x10010, // Image starts at 0x10 into .dfu file.
|
2015-07-30 12:41:33 -04:00
|
|
|
.size = 0x8000,
|
|
|
|
};
|
|
|
|
|
|
|
|
constexpr region_t baseband {
|
|
|
|
.offset = 0x20000,
|
|
|
|
.size = 0x8000,
|
|
|
|
};
|
|
|
|
|
|
|
|
constexpr region_t application {
|
|
|
|
.offset = 0x40000,
|
|
|
|
.size = 0x40000,
|
|
|
|
};
|
|
|
|
|
|
|
|
} /* namespace spi_flash */
|
|
|
|
} /* namespace portapack */
|
|
|
|
|
|
|
|
#endif/*__SPI_IMAGE_H__*/
|