Mercurial > public > hwos_code
comparison src/external_flash.inc @ 623:c40025d8e750
3.03 beta released
author | heinrichsweikamp |
---|---|
date | Mon, 03 Jun 2019 14:01:48 +0200 |
parents | b455b31ce022 |
children | 185ba2f91f59 |
comparison
equal
deleted
inserted
replaced
622:02d1386429a6 | 623:c40025d8e750 |
---|---|
1 ;============================================================================= | 1 ;============================================================================= |
2 ; | 2 ; |
3 ; File external_flash.inc V2.98 | 3 ; File external_flash.inc combined next generation V3.0.1 |
4 ; | 4 ; |
5 ; | 5 ; |
6 ; Copyright (c) 2011, JD Gascuel, HeinrichsWeikamp, all right reserved. | 6 ; Copyright (c) 2011, JD Gascuel, HeinrichsWeikamp, all right reserved. |
7 ;============================================================================= | 7 ;============================================================================= |
8 ; HISTORY | 8 ; HISTORY |
9 ; 2011-08-12 : [mH] creation | 9 ; 2011-08-12 : [mH] creation |
10 | 10 |
11 ; Misc | 11 ; Misc |
12 extern incf_ext_flash_address_p1 ; +1 for the ext_flash_address:3 | 12 extern incf_ext_flash_address_p1 ; +1 for the ext_flash_address:3 |
13 extern ext_flash_disable_protection ; Disables write protection | 13 extern ext_flash_disable_protection ; disables write protection |
14 extern ext_flash_enable_protection ; Enables write protection | 14 extern ext_flash_enable_protection ; enables write protection |
15 | 15 |
16 ; Writes | 16 ; Writes |
17 extern write_byte_ext_flash_plus ; Write from WREG and increase address after write with banking at 0x200000 | 17 extern write_byte_ext_flash_plus ; write from WREG and increase address after write with banking at 0x200000 |
18 extern write_byte_ext_flash_plus_nocnt ; No increase of ext_flash_dive_counter:3 | 18 extern write_byte_ext_flash_plus_nocnt ; no increase of ext_flash_dive_counter:3 |
19 extern write_byte_ext_flash_plus_nodel ; Does NOT delete 4kB Page when required | 19 extern write_byte_ext_flash_plus_nodel ; does NOT delete 4kB Page when required |
20 extern write_byte_ext_flash_plus_header ; Write from WREG and increase address after write | 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 | 21 extern ext_flash_byte_write ; writes one byte from WREG @ext_flash_address:3 |
22 extern ext_flash_byte_write_comms ; without wait, ~86us fixed delay due to 115200 Bauds (Use with caution) | 22 extern ext_flash_byte_write_comms ; without wait, ~86us fixed delay due to 115200 Bauds (Use with caution) |
23 extern write_spi1 ; Just (dummy)write to read a byte | 23 extern write_spi1 ; just (dummy)write to read a byte |
24 | 24 |
25 ; Delete | 25 ; Delete |
26 extern ext_flash_erase_logbook ; erases logbook memory (000000h -> 2FFFFFh -> 3MByte) | 26 extern ext_flash_erase_logbook ; erases logbook memory (000000h -> 2FFFFFh -> 3MByte) |
27 extern ext_flash_erase4kB ; Erases 4kB sector @ext_flash_address:3 | 27 extern ext_flash_erase4kB ; erases 4kB sector @ext_flash_address:3 |
28 | 28 |
29 ; Reads | 29 ; Reads |
30 extern ext_flash_read_block_start ; Block read start and reads one byte@ext_flash_address:3 into WREG | 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 | 31 extern ext_flash_read_block ; read another byte into WREG |
32 extern ext_flash_read_block_stop ; Stop block read | 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 ext_flash_rw | 33 extern ext_flash_byte_read ; read one byte@ext_flash_address:3 into WREG and ext_flash_rw |
34 extern ext_flash_byte_read_plus ; Return data read in WREG and ext_flash_rw and increase address after read with banking at 0x200000 | 34 extern ext_flash_byte_read_plus ; return data read in WREG and ext_flash_rw and increase address after read with banking at 0x200000 |
35 extern ext_flash_byte_read_plus_0x20 ; Return data read in WREG and ext_flash_rw | 35 extern ext_flash_byte_read_plus_0x20 ; return data read in WREG and ext_flash_rw |
36 | 36 |
37 | 37 |
38 ; Will decrease ext_flash_address:2 with the 8Bit value "ext_flash_temp1" | 38 ;----------------------------------------------------------------------------- |
39 ; Macros | |
40 | |
41 ; decrease ext_flash_address:2 by the 8 bit value "ext_flash_temp1" | |
39 extern decf_ext_flash_address0 | 42 extern decf_ext_flash_address0 |
40 decf_ext_flash_address macro ext_flash_temp1 | 43 decf_ext_flash_address macro ext_flash_temp1 |
41 movlw ext_flash_temp1 | 44 movlw ext_flash_temp1 |
42 call decf_ext_flash_address0 | 45 call decf_ext_flash_address0 |
43 endm | 46 endm |
44 | 47 |
45 | 48 ; increase ext_flash_address:2 by the 8 bit value "ext_flash_temp1" |
46 ; Will increase ext_flash_address:2 with the 8Bit value "ext_flash_temp1" | |
47 extern incf_ext_flash_address0 | 49 extern incf_ext_flash_address0 |
48 incf_ext_flash_address macro ext_flash_temp1 | 50 incf_ext_flash_address macro ext_flash_temp1 |
49 movlw ext_flash_temp1 | 51 movlw ext_flash_temp1 |
50 call incf_ext_flash_address0 | 52 call incf_ext_flash_address0 |
51 endm | 53 endm |
52 | 54 |
53 | 55 ; increase ext_flash_address:2 by the 8 bit value "ext_flash_temp1" with banking at 0x200000 |
54 ; With banking at 0x200000 | |
55 ; Will increase ext_flash_address:2 with the 8Bit value "ext_flash_temp1" | |
56 extern incf_ext_flash_address0_0x20 | 56 extern incf_ext_flash_address0_0x20 |
57 incf_ext_flash_address_0x20 macro ext_flash_temp1 | 57 incf_ext_flash_address_0x20 macro ext_flash_temp1 |
58 movlw ext_flash_temp1 | 58 movlw ext_flash_temp1 |
59 call incf_ext_flash_address0_0x20 | 59 call incf_ext_flash_address0_0x20 |
60 endm | 60 endm |
61 | |
62 |