Compare commits
2 commits
6960009b36
...
8c6784387e
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8c6784387e | ||
|
|
d4e57f5da3 |
2 changed files with 3 additions and 3 deletions
|
|
@ -220,7 +220,7 @@ static inline
|
||||||
uint8_t flash_erase_next_page()
|
uint8_t flash_erase_next_page()
|
||||||
{
|
{
|
||||||
uint16_t mode = 0x81; // Page Erase
|
uint16_t mode = 0x81; // Page Erase
|
||||||
if (~b & 8)
|
if (~fs.block & 8)
|
||||||
fs.npages++;
|
fs.npages++;
|
||||||
uint8_t n = 0;
|
uint8_t n = 0;
|
||||||
if (fs.page && !(fs.page & 0xff) && fs.npages & 0xff00) {
|
if (fs.page && !(fs.page & 0xff) && fs.npages & 0xff00) {
|
||||||
|
|
|
||||||
|
|
@ -81,7 +81,7 @@ ISR(RTC_CNT_vect, ISR_NAKED)
|
||||||
"subi r24, -1" "\n\t"
|
"subi r24, -1" "\n\t"
|
||||||
"sts clockh, r24" "\n\t"
|
"sts clockh, r24" "\n\t"
|
||||||
"lds r24, clockh+1" "\n\t"
|
"lds r24, clockh+1" "\n\t"
|
||||||
"sbci r24, -1" "\n\t"
|
"sbci r24, 0" "\n\t"
|
||||||
"sts clockh+1, r24" "\n\t"
|
"sts clockh+1, r24" "\n\t"
|
||||||
"2:" "\n\t"
|
"2:" "\n\t"
|
||||||
"pop r24" "\n\t"
|
"pop r24" "\n\t"
|
||||||
|
|
@ -109,7 +109,7 @@ ISR(RTC_CNT_vect)
|
||||||
if (flag & RTC_CNT_bm)
|
if (flag & RTC_CNT_bm)
|
||||||
RTC.CMP += rtc_config[1].val | rtc_config[2].val << 8;
|
RTC.CMP += rtc_config[1].val | rtc_config[2].val << 8;
|
||||||
if (flag & RTC_OVF_bm)
|
if (flag & RTC_OVF_bm)
|
||||||
clock += 1;
|
clockh += 1;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue