Mercurial > public > hwos_code
diff src/tft.asm @ 441:360acdcda0d7
+BUGFIX: Compatibility with "hwOS Config" fixed
+NEW: New hardware descriptor command 0x60 added (For PC programs)
author | heinrichsweikamp |
---|---|
date | Tue, 26 Jul 2016 12:08:29 +0200 |
parents | 95ee78f4a974 |
children | 4927ba3bd3b5 |
line wrap: on
line diff
--- a/src/tft.asm Wed Jul 13 13:06:02 2016 +0200 +++ b/src/tft.asm Tue Jul 26 12:08:29 2016 +0200 @@ -321,27 +321,18 @@ ; Data Transfer Synchronization Parameter_out 0x00, 0x00 Parameter_out 0x00, 0x00 - - Index_out 0x00 - rcall TFT_CmdRead_PROD ; Get ID into PRODL:PRODH - ; 5:197 -> display0 - ;37:147 -> display1 - movlw .5 - cpfseq PRODL ; display0? - bra TFT_boot_1 ; No - movlw .197 - cpfseq PRODH ; display0? - bra TFT_boot_1 ; No - -; Init through config table... - movlw LOW display0_config_table - movwf TBLPTRL - movlw HIGH display0_config_table - movwf TBLPTRH - movlw UPPER display0_config_table - movwf TBLPTRU - bcf screen_type - bra TFT_boot_com + + ; Get screentype from Bootloader-Info + movlw 0x7B + movwf TBLPTRL + movlw 0xF7 + movwf TBLPTRH + movlw 0x01 + movwf TBLPTRU + TBLRD*+ ; Reads .110 for cR and USB OSTC3, .0 for BLE (2 and 3), and .2 for display1 OSTC + movlw 0x02 + cpfseq TABLAT + bra TFT_boot_0 ; Display0 TFT_boot_1: ; Init through config table... @@ -352,7 +343,18 @@ movlw 0x01 movwf TBLPTRU bsf screen_type + bra TFT_boot_com +TFT_boot_0: +; Init through config table... + movlw LOW display0_config_table + movwf TBLPTRL + movlw HIGH display0_config_table + movwf TBLPTRH + movlw UPPER display0_config_table + movwf TBLPTRU + bcf screen_type + TFT_boot_com: rcall display0_init_loop @@ -660,7 +662,7 @@ setf TRISA ; PortA as input. setf TRISH ; PortH as input. RS_H ; Data -; WR_H ; Not write + WR_H ; Not write RD_L ; Read! nop nop