nrf: add NVMC driver.

This commit is contained in:
Dario Nieuwenhuis
2021-10-22 02:09:55 +02:00
parent 2b4e2bcbae
commit e78d226acd
12 changed files with 210 additions and 0 deletions

View File

@ -4,6 +4,8 @@ pub use nrf52805_pac as pac;
pub const EASY_DMA_SIZE: usize = (1 << 14) - 1;
pub const FORCE_COPY_BUFFER_SIZE: usize = 256;
pub const FLASH_SIZE: usize = 192 * 1024;
embassy_hal_common::peripherals! {
// RTC
RTC0,
@ -12,6 +14,9 @@ embassy_hal_common::peripherals! {
// WDT
WDT,
// NVMC
NVMC,
// RNG
RNG,

View File

@ -4,6 +4,8 @@ pub use nrf52810_pac as pac;
pub const EASY_DMA_SIZE: usize = (1 << 10) - 1;
pub const FORCE_COPY_BUFFER_SIZE: usize = 256;
pub const FLASH_SIZE: usize = 192 * 1024;
embassy_hal_common::peripherals! {
// RTC
RTC0,
@ -12,6 +14,9 @@ embassy_hal_common::peripherals! {
// WDT
WDT,
// NVMC
NVMC,
// RNG
RNG,

View File

@ -4,6 +4,8 @@ pub use nrf52811_pac as pac;
pub const EASY_DMA_SIZE: usize = (1 << 14) - 1;
pub const FORCE_COPY_BUFFER_SIZE: usize = 256;
pub const FLASH_SIZE: usize = 192 * 1024;
embassy_hal_common::peripherals! {
// RTC
RTC0,
@ -12,6 +14,9 @@ embassy_hal_common::peripherals! {
// WDT
WDT,
// NVMC
NVMC,
// RNG
RNG,

View File

@ -4,6 +4,8 @@ pub use nrf52820_pac as pac;
pub const EASY_DMA_SIZE: usize = (1 << 15) - 1;
pub const FORCE_COPY_BUFFER_SIZE: usize = 512;
pub const FLASH_SIZE: usize = 256 * 1024;
embassy_hal_common::peripherals! {
// RTC
RTC0,
@ -12,6 +14,9 @@ embassy_hal_common::peripherals! {
// WDT
WDT,
// NVMC
NVMC,
// RNG
RNG,

View File

@ -4,6 +4,12 @@ pub use nrf52832_pac as pac;
pub const EASY_DMA_SIZE: usize = (1 << 8) - 1;
pub const FORCE_COPY_BUFFER_SIZE: usize = 255;
// There are two variants. We set the higher size to make the entire flash
// usable in xxAA, but we'll probably split this in two cargi features later.
// nrf52832xxAA = 512kb
// nrf52832xxAB = 256kb
pub const FLASH_SIZE: usize = 512 * 1024;
embassy_hal_common::peripherals! {
// RTC
RTC0,
@ -13,6 +19,9 @@ embassy_hal_common::peripherals! {
// WDT
WDT,
// NVMC
NVMC,
// RNG
RNG,

View File

@ -4,6 +4,8 @@ pub use nrf52833_pac as pac;
pub const EASY_DMA_SIZE: usize = (1 << 16) - 1;
pub const FORCE_COPY_BUFFER_SIZE: usize = 512;
pub const FLASH_SIZE: usize = 512 * 1024;
embassy_hal_common::peripherals! {
// RTC
RTC0,
@ -13,6 +15,9 @@ embassy_hal_common::peripherals! {
// WDT
WDT,
// NVMC
NVMC,
// RNG
RNG,

View File

@ -4,6 +4,8 @@ pub use nrf52840_pac as pac;
pub const EASY_DMA_SIZE: usize = (1 << 16) - 1;
pub const FORCE_COPY_BUFFER_SIZE: usize = 512;
pub const FLASH_SIZE: usize = 1024 * 1024;
embassy_hal_common::peripherals! {
// RTC
RTC0,
@ -13,6 +15,9 @@ embassy_hal_common::peripherals! {
// WDT
WDT,
// NVMC
NVMC,
// RNG
RNG,