Ignore:
Timestamp:
Oct 21, 2010, 1:32:46 PM (9 years ago)
Author:
mulligan
Message:

Serial input test: seems to work correctly (small bug corrected where
SCON.4 was not being set when there was input on the serial line).

File:
1 edited

Legend:

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

    r202 r203  
    4949
    5050let rec debug_continuation =
    51  None, `Out (
     51 (Some (`In (65536, (`SerialBuff (`Eight (vect_of_int 5 `Eight))), debug_continuation))), `Out (
    5252  fun time line ->
    5353    let _ = prerr_endline <*> string_of_line $ line in
     
    15871587           (match in_cont with
    15881588             Some (`In(time, line, cont)) when time >= status.clock && get_bit status.scon 4 ->
    1589                let status =
     1589               (let status =
    15901590                 match line with
    1591                    `P1 b ->
    1592                       { status with p1 = b; p1_latch = b; }
     1591                   `P1 b -> { status with p1 = b; p1_latch = b; }
    15931592                 | `P3 b -> { status with p3 = b; p3_latch = b; }
    15941593                 | `SerialBuff (`Eight b) ->
     
    16141613                              status
    16151614               in
    1616                  { status with io = cont }
     1615                 { status with io = cont })
     1616           | Some (`In(time, line, cont)) when time >= status.clock ->
     1617               (* DPM: if there's something on the line, we need to let the program know by setting SCON.4 *)
     1618               { status with scon = set_bit status.scon 4 true }
    16171619           | _ -> status) in
    16181620           (* Serial port output, part one *)
Note: See TracChangeset for help on using the changeset viewer.