aboutsummaryrefslogtreecommitdiff
path: root/imxrt1040evk/src/main.rs
blob: f1442136eebb8a98418c6554f8767cbdb05fbd87 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#![no_std]
#![no_main]

use panic_probe as _;

use imxrt1040evk::Algorithm;

flash_algorithm::algorithm!(Algorithm, {
    device_name: "imxrt1040_w25q64_132mhz",
    device_type: DeviceType::Onchip,
    flash_address: Algorithm::flash_address() as _,
    flash_size: Algorithm::flash_size_bytes() as _,
    // We support page crossings. Suggest a larger page
    // size so that probe-rs places larger buffers into
    // RAM per programming operation, reducing overhead.
    page_size: 4096,
    empty_value: 0xFF,
    program_time_out: 1000,
    erase_time_out: 2000,
    sectors: [{
        size: Algorithm::sector_size_bytes() as u32,
        address: 0x0,
    }]
});