Yes, it is possible to mix direct access to registers with IO class calls.
IO class is meant for convenience and cross device portability, speed
is secondary consideration. It can be used to configure individual pin
(if hardware allows that) at any time using IO.Configure(). IO pin
set/clear is slower then direct register access because it incurs
overhead of calling .Set or .Clr methods.
Example:
Sub Main()
Dim res As Boolean
res=IO.Configure(P1_25_OUT)
Do
IO1SET = &B00000010000000000000000000000000
IO1CLR = &B00000010000000000000000000000000
Loop
End Sub
|