firmware: fix a typo replacing spiflash::SECTOR_SIZE with PAGE_SIZE.

This commit is contained in:
whitequark 2017-12-28 15:25:40 +00:00 committed by Sebastien Bourdeauducq
parent 14a90e5386
commit e6306b712d
2 changed files with 4 additions and 3 deletions

View File

@ -6,8 +6,8 @@ mod imp {
use spiflash;
// One flash sector immediately before the firmware.
const ADDR: usize = ::mem::FLASH_BOOT_ADDRESS - spiflash::PAGE_SIZE;
const SIZE: usize = spiflash::PAGE_SIZE;
const ADDR: usize = ::mem::FLASH_BOOT_ADDRESS - spiflash::SECTOR_SIZE;
const SIZE: usize = spiflash::SECTOR_SIZE;
mod lock {
use core::slice;

View File

@ -3,7 +3,8 @@
use core::cmp;
use csr;
pub const PAGE_SIZE: usize = csr::CONFIG_SPIFLASH_PAGE_SIZE as usize;
pub const SECTOR_SIZE: usize = csr::CONFIG_SPIFLASH_SECTOR_SIZE as usize;
pub const PAGE_SIZE: usize = csr::CONFIG_SPIFLASH_PAGE_SIZE as usize;
const PAGE_MASK: usize = PAGE_SIZE - 1;