mirror of https://github.com/m-labs/artiq.git
firmware: fix a typo replacing spiflash::SECTOR_SIZE with PAGE_SIZE.
This commit is contained in:
parent
6d0168edb7
commit
d2687ce3c4
|
@ -38,8 +38,8 @@ mod imp {
|
||||||
use super::Error;
|
use super::Error;
|
||||||
|
|
||||||
// One flash sector immediately before the firmware.
|
// One flash sector immediately before the firmware.
|
||||||
const ADDR: usize = ::mem::FLASH_BOOT_ADDRESS - spiflash::PAGE_SIZE;
|
const ADDR: usize = ::mem::FLASH_BOOT_ADDRESS - spiflash::SECTOR_SIZE;
|
||||||
const SIZE: usize = spiflash::PAGE_SIZE;
|
const SIZE: usize = spiflash::SECTOR_SIZE;
|
||||||
|
|
||||||
mod lock {
|
mod lock {
|
||||||
use core::slice;
|
use core::slice;
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
use core::cmp;
|
use core::cmp;
|
||||||
use csr;
|
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;
|
const PAGE_MASK: usize = PAGE_SIZE - 1;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue