Mercurial > public > hwos_code
comparison src/tft_outputs.asm @ 205:618191753d2b
Preparations for 1.7
author | heinrichsweikamp |
---|---|
date | Wed, 26 Nov 2014 14:30:25 +0100 |
parents | dd9b167e82dc |
children | f5d909e03f52 |
comparison
equal
deleted
inserted
replaced
204:93085f540746 | 205:618191753d2b |
---|---|
2219 bsf depth_greater_100m ; Set Flag | 2219 bsf depth_greater_100m ; Set Flag |
2220 return | 2220 return |
2221 | 2221 |
2222 ;============================================================================= | 2222 ;============================================================================= |
2223 | 2223 |
2224 ; global TFT_user_image | |
2225 ;TFT_user_image: | |
2226 ; ;---- Display user image ------------------------------------------------- | |
2227 ; ; Compute address in external EEPROM | |
2228 ; movff opt_skin,WREG | |
2229 ; mullw 0x50 | |
2230 ; movff PRODL,ext_flash_address+1 | |
2231 ; movf PRODH,W | |
2232 ; iorlw 0x30 | |
2233 ; movwf ext_flash_address+2 | |
2234 ; | |
2235 ; ; First pixel at @+4: | |
2236 ; movlw 4 | |
2237 ; movwf ext_flash_address+0 | |
2238 ; | |
2239 ; ; Read first pixel | |
2240 ; call ext_flash_read_block_start | |
2241 ;; movff SSP2BUF,skin_color+1 ; TFT format: HIGH is first... | |
2242 ; movwf SSP2BUF ; Write to buffer to initiate new read | |
2243 ; btfss SSP2STAT, BF ; Next byte ready ? | |
2244 ; bra $-2 ; NO: wait... | |
2245 ;; movff SSP2BUF,skin_color+0 | |
2246 ; call ext_flash_read_block_stop | |
2247 ; | |
2248 ; ; Make a frame of the retrieved skin color. | |
2249 ; setf win_color1 | |
2250 ; setf win_color2 | |
2251 ; WIN_FRAME_COLOR16 user_image_upper-.1, user_image_upper+.100,user_image_left-.1, user_image_left+.50 | |
2252 ; | |
2253 ; WIN_LEFT user_image_left+.25 | |
2254 ; WIN_TOP user_image_upper+.50 | |
2255 ; | |
2256 ; ; Display skin icon | |
2257 ; clrf ext_flash_address+0 | |
2258 ; call TFT_write_flash_image_addr | |
2259 ; | |
2260 ; ;---- Print custom text string | |
2261 ; WIN_LEFT user_image_left+.50+.5 | |
2262 ; WIN_TOP user_image_upper+.0 | |
2263 ; | |
2264 ; ; ---- STRNCPY : String copy from RAM | |
2265 ; ; lfsr FSR0, opt_name ; Source | |
2266 ; lfsr FSR1, .13 ; Len max | |
2267 ; lfsr FSR2, buffer ; destination | |
2268 ;TFT_user_image_1: | |
2269 ; movf POSTINC0,W ; Get byte | |
2270 ; bz TFT_user_image_2 ; End if NULL | |
2271 ; movwf POSTINC2 ; NO: copy | |
2272 ; decfsz FSR1L ; Max len reached ? | |
2273 ; bra TFT_user_image_1 ; NO: loop | |
2274 ;TFT_user_image_2: | |
2275 ; clrf POSTINC2 ; Mark end of string | |
2276 ; | |
2277 ; goto aa_wordprocessor ; and print | |
2278 | |
2279 | |
2280 global TFT_custom_text | 2224 global TFT_custom_text |
2281 TFT_custom_text: ; Show the custom text | 2225 TFT_custom_text: ; Show the custom text |
2282 lfsr FSR0, opt_name ; Source | 2226 lfsr FSR0, opt_name ; Source |
2283 WIN_SMALL surf_customtext_column,surf_customtext_row1 ; First row | 2227 WIN_SMALL surf_customtext_column,surf_customtext_row1 ; First row |
2284 rcall TFT_custom_text_2 ; Show up to 12 chars and print | 2228 rcall TFT_custom_text_2 ; Show up to 12 chars and print |