Просмотр исходного кода

Add AT28, as a companion to AT28!

This word, suitable to plug to A, , increases HERE before doing its
verification to minimize waiting time: While we increase HERE, the
AT28 has the time to do its programming, and thus we'll need to idle
for less time afterwards.

Also, made the mismatch check silently ignore MSB. Previously, writing
a value larger than 0xff with AT28! would always result in a mismatch.
master
Virgil Dupras 3 лет назад
Родитель
Сommit
06b71a6906
1 измененных файлов: 5 добавлений и 5 удалений
  1. +5
    -5
      blk.fs

+ 5
- 5
blk.fs Просмотреть файл

@@ -2204,11 +2204,10 @@ XCURRENT @ _xapply ORG @ 0x04 ( stable ABI BOOT ) + !
':' X' _ 4 - C! ( give : its name )
'(' X' _ 4 - C!
( ----- 400 )
( With dst being assumed to be an AT28 EEPROM, perform !
( With dst being assumed to be an AT28 EEPROM, perform C!
operation while doing the right thing. Checks data integrity
and ABORT on mismatch. )
: AT28! ( n a -- )
2DUP C!
: _ ( n a -- wait until addr is "stable", err on mismatch )
( as long as writing operation is running, IO/6 will toggle
at each read attempt. We know that write is finished when
we read the same value twice. )
@@ -2217,8 +2216,9 @@ XCURRENT @ _xapply ORG @ 0x04 ( stable ABI BOOT ) + !
OVER C@ ( n1 a n2 n3 )
= UNTIL
( We're finished writing. do we have a mismatch? )
C@ = NOT IF ABORT" mismatch" THEN
;
C@ SWAP 0xff AND = NOT IF ABORT" mismatch" THEN ;
: AT28! ( n a -- ) 2DUP C! _ ;
: AT28, ( n -- ) H@ 2DUP C! DUP 1+ HERE ! _ ;
( ----- 401 )
Grid subsystem



Загрузка…
Отмена
Сохранить