iic_start
        PushLR

        MOV      R0, #0          ; get status reg
        SWI      XParallel_Op
        ; ignore errors
        TST      R2, #SCL_IN     ; SCL high?
        BEQ      iic_start_continue

        ; clock is low, so set it up
        ; nb: SCL floats high - why is it low?
        ;     we should check we arent mid-transfer
        MOV      R1, #(SDA_HIGH + SCL_LOW)
        BL       toggle_printer

        MOV      R1, #(SDA_HIGH + SCL_HIGH)
        BL       toggle_printer

iic_start_continue
        MOV      R1, #(SDA_LOW + SCL_HIGH)
        ; transition of SDA (high->low), SCL high
        BL       toggle_printer

        MOV      R1, #(SDA_LOW + SCL_LOW)
        BL       toggle_printer

        PullRet
