Subversion Repositories HomeAutomation

Rev

Rev 228 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed

Rev 228 Rev 233
Line 21... Line 21...
21
    boot_page_erase(flash_prev_addr);
21
    boot_page_erase(flash_prev_addr);
22
    boot_spm_busy_wait();      // Wait until the memory is erased.
22
    boot_spm_busy_wait();      // Wait until the memory is erased.
23
   
23
   
24
    boot_page_write(flash_prev_addr);     // Store buffer in flash page.
24
    boot_page_write(flash_prev_addr);     // Store buffer in flash page.
25
    boot_spm_busy_wait();       // Wait until the memory is written.
25
    boot_spm_busy_wait();       // Wait until the memory is written.
-
 
26
 
-
 
27
    flash_buffer_dirty = 0;
26
 
28
 
27
    // Reenable RWW-section again. We need this if we want to jump back
29
    // Reenable RWW-section again. We need this if we want to jump back
28
    // to the application after bootloading.
30
    // to the application after bootloading.
29
 
31
 
30
    boot_rww_enable ();
32
    boot_rww_enable ();
31
 
-
 
32
    // Re-enable interrupts (if they were ever enabled).
33
    // Re-enable interrupts (if they were ever enabled).
33
 
34
 
34
    SREG = sreg;
35
    SREG = sreg;
35
}
36
}
36
 
37