File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -70,6 +70,8 @@ pub mod target_constants {
7070 pub const SRAM_LOWER : usize = 0x2000_0000 ;
7171 pub const SRAM_UPPER : usize = 0x3000_0000 ;
7272 pub const FORCE_COPY_BUFFER_SIZE : usize = 255 ;
73+ const _CHECK_FORCE_COPY_BUFFER_SIZE: usize = EASY_DMA_SIZE - FORCE_COPY_BUFFER_SIZE ;
74+ // ERROR: FORCE_COPY_BUFFER_SIZE must be <= EASY_DMA_SIZE
7375}
7476#[ cfg( any( feature = "52840" , feature = "52833" , feature = "9160" ) ) ]
7577pub mod target_constants {
@@ -79,6 +81,8 @@ pub mod target_constants {
7981 pub const SRAM_LOWER : usize = 0x2000_0000 ;
8082 pub const SRAM_UPPER : usize = 0x3000_0000 ;
8183 pub const FORCE_COPY_BUFFER_SIZE : usize = 1024 ;
84+ const _CHECK_FORCE_COPY_BUFFER_SIZE: usize = EASY_DMA_SIZE - FORCE_COPY_BUFFER_SIZE ;
85+ // ERROR: FORCE_COPY_BUFFER_SIZE must be <= EASY_DMA_SIZE
8286}
8387
8488/// Does this slice reside entirely within RAM?
Original file line number Diff line number Diff line change @@ -381,7 +381,7 @@ where
381381
382382 // Chunk write data
383383 let wr_buffer = & mut [ 0 ; FORCE_COPY_BUFFER_SIZE ] [ ..] ;
384- for chunk in tx_buffer. chunks ( FORCE_COPY_BUFFER_SIZE . min ( EASY_DMA_SIZE ) ) {
384+ for chunk in tx_buffer. chunks ( FORCE_COPY_BUFFER_SIZE ) {
385385 // Copy chunk into RAM
386386 wr_buffer[ ..chunk. len ( ) ] . copy_from_slice ( chunk) ;
387387
You can’t perform that action at this time.
0 commit comments