avr: use macros instead of costly calls for SPI on ILI9341.
This commit is contained in:
@@ -8,6 +8,22 @@
|
||||
; ***************************************************************************
|
||||
|
||||
|
||||
; ***************************************************************************
|
||||
; macros
|
||||
|
||||
; @param @0 register to use
|
||||
|
||||
.macro M_SPIHW_MASTER_SEND_BYTE
|
||||
outr SPDR, @0 ; masterSend Byte
|
||||
l1_%:
|
||||
inr @0, SPSR
|
||||
sbrs @0, SPIF
|
||||
rjmp l1_%
|
||||
inr @0, SPDR
|
||||
.endm
|
||||
|
||||
|
||||
|
||||
; ***************************************************************************
|
||||
; defines
|
||||
|
||||
|
||||
Reference in New Issue
Block a user