avr: started working on new LCD module and SPI module.
This commit is contained in:
@@ -121,6 +121,11 @@
|
||||
.include "modules/owimaster/main.asm"
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef MODULES_SPI_HW
|
||||
.include "modules/spi_hw/main.asm"
|
||||
#endif
|
||||
|
||||
#ifdef MODULES_DS18B20
|
||||
.include "modules/ds18b20/main2.asm"
|
||||
#ifdef MODULES_NETWORK
|
||||
@@ -147,6 +152,13 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef MODULES_ILI9341
|
||||
.include "modules/lcd2/ili9341/defs.asm"
|
||||
.include "modules/lcd2/ili9341/main.asm"
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#ifdef APPS_MOTION
|
||||
.include "modules/f_keepup/main.asm"
|
||||
.include "modules/valsched/main.asm"
|
||||
|
||||
@@ -84,6 +84,11 @@ initModules:
|
||||
#ifdef MODULES_OWI_MASTER
|
||||
rcall OwiMaster_Init
|
||||
#endif
|
||||
|
||||
#ifdef MODULES_SPI_HW
|
||||
rcall SPIHW_Init
|
||||
#endif
|
||||
|
||||
#ifdef MODULES_LCD
|
||||
rcall LCD_Init
|
||||
#endif
|
||||
@@ -135,6 +140,10 @@ initModules:
|
||||
rcall CCS811_Init
|
||||
#endif
|
||||
|
||||
#ifdef MODULES_ILI9341
|
||||
rcall ILI9341_Init
|
||||
#endif
|
||||
|
||||
|
||||
; done
|
||||
ret
|
||||
@@ -169,10 +178,6 @@ runModules_Com:
|
||||
runModules_ComEnd:
|
||||
#endif
|
||||
|
||||
#ifdef MODULES_UART_HW
|
||||
rcall NET_Uart_Run
|
||||
#endif
|
||||
|
||||
#ifdef MODULES_TTYONUART1
|
||||
rcall TtyOnUart1_Run
|
||||
#endif
|
||||
|
||||
@@ -79,6 +79,68 @@
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; SPI hardware module
|
||||
|
||||
.equ SPIHW_SS_DDR = DDRB
|
||||
.equ SPIHW_SS_INPUT = PINB
|
||||
.equ SPIHW_SS_OUTPUT = PORTB
|
||||
.equ SPIHW_SS_PIN = PORTB4
|
||||
|
||||
.equ SPIHW_MOSI_DDR = DDRB
|
||||
.equ SPIHW_MOSI_INPUT = PINB
|
||||
.equ SPIHW_MOSI_OUTPUT = PORTB
|
||||
.equ SPIHW_MOSI_PIN = PORTB5
|
||||
|
||||
.equ SPIHW_MISO_DDR = DDRB
|
||||
.equ SPIHW_MISO_INPUT = PINB
|
||||
.equ SPIHW_MISO_OUTPUT = PORTB
|
||||
.equ SPIHW_MISO_PIN = PORTB6
|
||||
|
||||
.equ SPIHW_SCK_DDR = DDRB
|
||||
.equ SPIHW_SCK_INPUT = PINB
|
||||
.equ SPIHW_SCK_OUTPUT = PORTB
|
||||
.equ SPIHW_SCK_PIN = PORTB7
|
||||
|
||||
.equ SPIHW_SS0_DDR = DDRB
|
||||
.equ SPIHW_SS0_OUTPUT = PORTB
|
||||
.equ SPIHW_SS0_INPUT = PORTB
|
||||
.equ SPIHW_SS0_PIN = PORTB0
|
||||
|
||||
.equ SPIHW_SS1_DDR = DDRB
|
||||
.equ SPIHW_SS1_OUTPUT = PORTB
|
||||
.equ SPIHW_SS1_INPUT = PORTB
|
||||
.equ SPIHW_SS1_PIN = PORTB1
|
||||
|
||||
.equ SPIHW_SS2_DDR = DDRB
|
||||
.equ SPIHW_SS2_OUTPUT = PORTB
|
||||
.equ SPIHW_SS2_INPUT = PORTB
|
||||
.equ SPIHW_SS2_PIN = PORTB2
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; ILI9341 module
|
||||
|
||||
.equ ILI9341_DEVICENUM = 0
|
||||
.equ ILI9341_DSP_WIDTH = 320
|
||||
.equ ILI9341_DSP_HEIGHT = 240
|
||||
|
||||
.equ ILI9341_RESET_DDR = DDRB
|
||||
.equ ILI9341_RESET_OUTPUT = PORTB
|
||||
.equ ILI9341_RESET_INPUT = PORTB
|
||||
.equ ILI9341_RESET_PIN = PORTB3
|
||||
|
||||
.equ ILI9341_DC_DDR = DDRD
|
||||
.equ ILI9341_DC_OUTPUT = PORTD
|
||||
.equ ILI9341_DC_INPUT = PORTD
|
||||
.equ ILI9341_DC_PIN = PORTD4
|
||||
|
||||
.equ ILI9341_LED_DDR = DDRD
|
||||
.equ ILI9341_LED_OUTPUT = PORTD
|
||||
.equ ILI9341_LED_INPUT = PORTD
|
||||
.equ ILI9341_LED_PIN = PORTD5
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user