avr: use macros instead of costly calls for SPI on ILI9341.
This commit is contained in:
@@ -179,10 +179,12 @@ ili9341ImageIdx2WritePixels_l1:
|
||||
ld r17, X+
|
||||
ld r16, X
|
||||
; send to SPI (high byte first)
|
||||
rcall SPIHW_MasterTransfer ; (R16)
|
||||
mov r16, r17
|
||||
rcall SPIHW_MasterTransfer ; (R16)
|
||||
|
||||
; rcall SPIHW_MasterTransfer ; (R16)
|
||||
M_SPIHW_MASTER_SEND_BYTE r16
|
||||
; mov r16, r17
|
||||
; rcall SPIHW_MasterTransfer ; (R16)
|
||||
M_SPIHW_MASTER_SEND_BYTE r17
|
||||
|
||||
dec r22 ; pixelCounterInByte
|
||||
dec r20 ; runWidth
|
||||
brne ili9341ImageIdx2WritePixels_horizLoop
|
||||
@@ -280,10 +282,12 @@ ili9341ImageIdx2rleWritePixels_l1:
|
||||
ld r17, X+
|
||||
ld r16, X
|
||||
; send to SPI (high byte first)
|
||||
rcall SPIHW_MasterTransfer ; (R16)
|
||||
mov r16, r17
|
||||
rcall SPIHW_MasterTransfer ; (R16)
|
||||
|
||||
; rcall SPIHW_MasterTransfer ; (R16)
|
||||
M_SPIHW_MASTER_SEND_BYTE r16
|
||||
; mov r16, r17
|
||||
; rcall SPIHW_MasterTransfer ; (R16)
|
||||
M_SPIHW_MASTER_SEND_BYTE r17
|
||||
|
||||
dec r22 ; pixelCounterInByte
|
||||
dec r20 ; runWidth
|
||||
brne ili9341ImageIdx2rleWritePixels_horizLoop
|
||||
|
||||
Reference in New Issue
Block a user