From de94590fa0c4d9c8778f5fcdc65dcec7f6c391be Mon Sep 17 00:00:00 2001 From: Martin Preuss Date: Wed, 21 May 2025 01:44:38 +0200 Subject: [PATCH] ili9341: moved io code into own file. changed args to r0-r11. --- avr/devices/all/includes.asm | 1 + avr/modules/lcd2/ili9341/io_spi.asm | 112 ++++++ avr/modules/lcd2/ili9341/main.asm | 527 +++++++++++----------------- 3 files changed, 310 insertions(+), 330 deletions(-) create mode 100644 avr/modules/lcd2/ili9341/io_spi.asm diff --git a/avr/devices/all/includes.asm b/avr/devices/all/includes.asm index 59569b8..77a1647 100644 --- a/avr/devices/all/includes.asm +++ b/avr/devices/all/includes.asm @@ -155,6 +155,7 @@ #ifdef MODULES_ILI9341 .include "modules/lcd2/ili9341/defs.asm" .include "modules/lcd2/ili9341/main.asm" +.include "modules/lcd2/ili9341/io_spi.asm" #endif diff --git a/avr/modules/lcd2/ili9341/io_spi.asm b/avr/modules/lcd2/ili9341/io_spi.asm new file mode 100644 index 0000000..a91629a --- /dev/null +++ b/avr/modules/lcd2/ili9341/io_spi.asm @@ -0,0 +1,112 @@ +; *************************************************************************** +; copyright : (C) 2025 by Martin Preuss +; email : martin@libchipcard.de +; +; *************************************************************************** +; * This file is part of the project "AqHome". * +; * Please see toplevel file COPYING of that project for license details. * +; *************************************************************************** + +; generally we use the following parameters here: +; @param r1:r0 background color +; @param r3:r2 foreground color +; @param r5:r4 X0 +; @param r7:r6 Y0 +; @param r9:r8 X1/W +; @param r11:r10 Y1/H + + +; *************************************************************************** +; defines + +.equ ILI9341_SPIMODE = (0<