File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change 55
66import ctypes
77from qiling .hw .peripheral import QlPeripheral
8- from qiling .hw .const .stm32f4xx_dma import DMA , DMA_CR
8+ from qiling .hw .const .stm32f4xx_dma import DMA , DMA_SxCR
99
1010class Stream (ctypes .Structure ):
1111 _fields_ = [
@@ -18,13 +18,13 @@ class Stream(ctypes.Structure):
1818 ]
1919
2020 def enable (self ):
21- return self .CR & DMA_CR .EN
21+ return self .CR & DMA_SxCR .EN
2222
2323 def transfer_direction (self ):
24- return self .CR & DMA_CR .DIR
24+ return self .CR & DMA_SxCR .DIR
2525
2626 def transfer_size (self ):
27- PSIZE = self .CR & DMA_CR .PSIZE
27+ PSIZE = self .CR & DMA_SxCR .PSIZE
2828 if PSIZE == DMA .PDATAALIGN_BYTE :
2929 return 1
3030 if PSIZE == DMA .PDATAALIGN_HALFWORD :
@@ -44,13 +44,13 @@ def step(self, mem):
4444 mem .write (dst , bytes (mem .read (src , size )))
4545
4646 self .NDTR -= 1
47- if self .CR & DMA_CR .MINC :
47+ if self .CR & DMA_SxCR .MINC :
4848 self .M0AR += size
49- if self .CR & DMA_CR .PINC :
49+ if self .CR & DMA_SxCR .PINC :
5050 self .PAR += size
5151
5252 if self .NDTR == 0 :
53- self .CR &= ~ DMA_CR .EN
53+ self .CR &= ~ DMA_SxCR .EN
5454 return True
5555
5656class STM32F4xxDma (QlPeripheral ):
You can’t perform that action at this time.
0 commit comments