Mercurial > public > hwos_code
annotate src/external_flash.inc @ 570:c8ea60294175
react to external S8 HUD disconnect or failure in surface mode
author | heinrichsweikamp |
---|---|
date | Sun, 11 Feb 2018 11:52:50 +0100 |
parents | 9c54849b8d3b |
children | b455b31ce022 |
rev | line source |
---|---|
0 | 1 ;============================================================================= |
2 ; | |
3 ; File external_flash.inc | |
4 ; | |
5 ; | |
6 ; Copyright (c) 2011, JD Gascuel, HeinrichsWeikamp, all right reserved. | |
7 ;============================================================================= | |
8 ; HISTORY | |
9 ; 2011-08-12 : [mH] creation | |
10 | |
11 ; Misc | |
420 | 12 extern incf_ext_flash_address_p1 ; +1 for the ext_flash_address:3 |
0 | 13 extern ext_flash_disable_protection; Disables write protection |
14 extern ext_flash_enable_protection ; Enables write protection | |
561
9c54849b8d3b
Remove routine to fix corrupt dives made with v1.80
heinrichsweikamp
parents:
423
diff
changeset
|
15 |
0 | 16 ; Writes |
17 extern write_byte_ext_flash_plus ; Write from WREG and increase address after write with banking at 0x200000 | |
279 | 18 extern write_byte_ext_flash_plus_nocnt ; No increase of ext_flash_dive_counter:3 |
278
dfac47ac2e1d
BUGFIX: There was a 1:4096 chance that a portion of a dive was not stored correctly resulting in download issues
heinrichsweikamp
parents:
6
diff
changeset
|
19 extern write_byte_ext_flash_plus_nodel ; Does NOT delete 4kB Page when required |
0 | 20 extern write_byte_ext_flash_plus_header ; Write from WREG and increase address after write |
21 extern ext_flash_byte_write ; Writes one byte from WREG @ext_flash_address:3 | |
423
ccaaac45b61a
_another_ timing fix for firmware updates (2.07 was not published yet anyway)
heinrichsweikamp
parents:
420
diff
changeset
|
22 extern ext_flash_byte_write_comms ; without wait, ~86us fixed delay due to 115200 Bauds (Use with caution) |
0 | 23 extern write_spi1 ; Just (dummy)write to read a byte |
24 | |
25 ; Delelte | |
26 extern ext_flash_erase_logbook ; erases logbook memory (000000h -> 2FFFFFh -> 3MByte) | |
27 extern ext_flash_erase4kB ; Erases 4kB sector @ext_flash_address:3 | |
28 | |
29 ; Reads | |
30 extern ext_flash_read_block_start ; Block read start and reads one byte@ext_flash_address:3 into WREG | |
31 extern ext_flash_read_block ; Read another byte into WREG | |
32 extern ext_flash_read_block_stop ; Stop block read | |
33 extern ext_flash_byte_read ; Reads one byte@ext_flash_address:3 into WREG and temp1 | |
34 extern ext_flash_byte_read_plus ; Return data read in WREG and temp1 and increase address after read with banking at 0x200000 | |
35 extern ext_flash_byte_read_plus_0x20; Return data read in WREG and temp1 | |
36 | |
37 ; Will decrease ext_flash_address:2 with the 8Bit value "ext_flash_temp1" | |
38 extern decf_ext_flash_address0 | |
39 decf_ext_flash_address macro ext_flash_temp1 | |
40 movlw ext_flash_temp1 | |
41 call decf_ext_flash_address0 | |
42 endm | |
43 | |
44 extern incf_ext_flash_address0 | |
45 ; Will increase ext_flash_address:2 with the 8Bit value "ext_flash_temp1" | |
46 incf_ext_flash_address macro ext_flash_temp1 | |
47 movlw ext_flash_temp1 | |
48 call incf_ext_flash_address0 | |
49 endm | |
50 | |
51 ; With banking at 0x200000 | |
52 extern incf_ext_flash_address0_0x20 | |
53 ; Will increase ext_flash_address:2 with the 8Bit value "ext_flash_temp1" | |
54 incf_ext_flash_address_0x20 macro ext_flash_temp1 | |
55 movlw ext_flash_temp1 | |
56 call incf_ext_flash_address0_0x20 | |
57 endm | |
58 | |
59 |