Ignore:
Timestamp:
Nov 5, 2010, 2:19:49 PM (9 years ago)
Author:
mulligan
Message:

Timer 2 16 bit auto reload implemented.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Deliverables/D4.1/ASMInterpret.ml

    r217 r218  
    13101310      (* Counter/interval mode *)
    13111311      if ct2 then
    1312         assert false
     1312        let word = mk_word status.th2 status.tl2 in
     1313        let res,_,ov,_ = add16_with_c word ticks false in
     1314          if ov then
     1315            let new_th2 = status.rcap2h in
     1316            let new_tl2 = status.rcap2l in
     1317            let b = set_bit status.t2con 7 true in
     1318              { status with tcon = b;
     1319                            th2 = new_th2;
     1320                            tl2 = new_tl2 }
     1321          else
     1322            let new_th2, new_tl2 = from_word res in
     1323            { status with th2 = new_th2;
     1324                          tl2 = new_tl2 }
    13131325      (* Capture mode *)
    13141326      else if cp2 then
Note: See TracChangeset for help on using the changeset viewer.