; PORT* may be read, see below
; everything else untouched
;
-; LAT*<bit> TRIS*<bit> PORT*
-; pin_z untouched set untouched
-; pin_h set cleared untouched
-; pin_l cleared cleared untouched
-; pin_nz untouched cleared untouched
-; pin_vh set untouched untouched
-; pin_vl cleared untouched untouched
-; pin_ifh untouched untouched read
-; pin_ifl untouched untouched read
+; LAT*<bit> TRIS*<bit> PORT* W
+; pin_z - set - -
+; pin_h set cleared - -
+; pin_l cleared cleared - -
+; pin_nz - cleared - -
+; pin_vh set - - -
+; pin_vl cleared - - -
+; pin_vhl toggled - - -
+; pin_ifh - - read -
+; pin_ifl - - read -
+; pinlat_ifh read - - -
+; pinlat_ifl read - - -
+; pin_inw_ifh - - - read
+; pin_inw_ifl - - - read
pin_z macro pinspec
bs_f TRISA + (TRISB-TRISA)*((pinspec-0xa) & 15), pinspec >> 4
bt_f_if1 LATA + (LATB-LATA)*((pinspec-0xa) & 15), pinspec >> 4
endm
-pinlat_ifl macro pinspec
+pinlat_ifl macro pinspec
bt_f_if0 LATA + (LATB-LATA)*((pinspec-0xa) & 15), pinspec >> 4
endm
bt_w_if1 pinspec >> 4
endm
-pin_inw_ifl macro pinspec
+pin_inw_ifl macro pinspec
bt_w_if0 pinspec >> 4
endm