From c79037a1e15afe3012f58acfd627b6bf75fb4d93 Mon Sep 17 00:00:00 2001 From: Martin Preuss Date: Tue, 10 Sep 2024 02:56:50 +0200 Subject: [PATCH] avr: move definition of TWI_BIT_LENGTH to device defs. --- avr/devices/n11/n11_defs.asm | 4 +++- avr/devices/n12/n12_defs.asm | 3 ++- avr/modules/twimaster/main.asm | 7 ------- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/avr/devices/n11/n11_defs.asm b/avr/devices/n11/n11_defs.asm index e0d1497..c124361 100644 --- a/avr/devices/n11/n11_defs.asm +++ b/avr/devices/n11/n11_defs.asm @@ -69,6 +69,9 @@ ; --------------------------------------------------------------------------- ; TWI master module +;.equ TWI_BIT_LENGTH = 10000 ; 100000 and 200000 works for display: 10000, 100000, 200000 +.equ TWI_BIT_LENGTH = 1 ; 10, 100, 500, 100000 and 200000 works for display: 10000, 100000, 200000 + .equ TWI_DDR_SCL = DDRA .equ TWI_PORT_SCL = PORTA .equ TWI_PIN_SCL = PINA @@ -85,7 +88,6 @@ ; LCD module .equ LCD_TWI_ADDRESS = 0x3c -#define LCD_MINIMAL_FONT diff --git a/avr/devices/n12/n12_defs.asm b/avr/devices/n12/n12_defs.asm index 758ba45..317aa0e 100644 --- a/avr/devices/n12/n12_defs.asm +++ b/avr/devices/n12/n12_defs.asm @@ -66,6 +66,8 @@ ; --------------------------------------------------------------------------- ; TWI master module +.equ TWI_BIT_LENGTH = 1 ; 100000 and 200000 works for display: 10000, 100000, 200000 + .equ TWI_DDR_SCL = DDRA .equ TWI_PORT_SCL = PORTA .equ TWI_PIN_SCL = PINA @@ -81,7 +83,6 @@ ; LCD module .equ LCD_TWI_ADDRESS = 0x3c -#define LCD_MINIMAL_FONT diff --git a/avr/modules/twimaster/main.asm b/avr/modules/twimaster/main.asm index 9a8f8d3..e9fd5de 100644 --- a/avr/modules/twimaster/main.asm +++ b/avr/modules/twimaster/main.asm @@ -10,13 +10,6 @@ -; *************************************************************************** -; defines - -.equ TWI_BIT_LENGTH = 10000 ; 100000 and 200000 works for display: 10000, 100000, 200000 - - - ; *************************************************************************** ; data