Start Back Next End
  
ZBasic Language Reference
172
ZBasic Microcontrollers
ATxmega-based ZBasic Devices
' For accessing I/O ports:
Structure Port_t
    Public Volatile Dir as Byte
    Public Volatile DirSet as Byte
    Public Volatile DirClr as Byte
    Public Volatile DirTgl as Byte
    Public Volatile Out as Byte
    Public Volatile OutSet as Byte
    Public Volatile OutClr as Byte
    Public Volatile OutTgl as Byte
    Public Volatile In as Byte
    Public Volatile IntCtrl as Byte
    Public Volatile Int0Mask as Byte
    Public Volatile Int1Mask as Byte
    Public Volatile IntFlags as Byte
    Public Volatile unused(1 to 3) as Byte
    Public Volatile Pin0Ctrl as Byte
    Public Volatile Pin1Ctrl as Byte
    Public Volatile Pin2Ctrl as Byte
    Public Volatile Pin3Ctrl as Byte
    Public Volatile Pin4Ctrl as Byte
    Public Volatile Pin5Ctrl as Byte
    Public Volatile Pin6Ctrl as Byte
    Public Volatile Pin7Ctrl as Byte
End Structure
' For accessing 16-bit timers (Type 0):
Structure TC0_t
    Public Volatile CtrlA as Byte
    Public Volatile CtrlB as Byte
    Public Volatile CtrlC as Byte
    Public Volatile CtrlD as Byte
    Public Volatile CtrlE as Byte
    Public Volatile unused1 as Byte
    Public Volatile IntCtrlA as Byte
    Public Volatile IntCtrlB as Byte
    Public Volatile CtrlFClr as Byte
    Public Volatile CtrlFSet as Byte
    Public Volatile CtrlGClr as Byte
    Public Volatile CtrlGSet as Byte
    Public Volatile IntFlags as Byte
    Public Volatile unused2(1 to 2) as Byte
    Public Volatile Temp as Byte
    Public Volatile unused3(1 to 16) as Byte
    Public Volatile Cnt as UnsignedInteger
    Public Volatile unused4(1 to 4) as Byte
    Public Volatile Per as UnsignedInteger
    Public Volatile CCA as UnsignedInteger
    Public Volatile CCB as UnsignedInteger
    Public Volatile CCC as UnsignedInteger
    Public Volatile CCD as UnsignedInteger
    Public Volatile unused5(1 to 6) as Byte
    Public Volatile PerBuf as UnsignedInteger
    Public Volatile CCABuf as UnsignedInteger
    Public Volatile CCBBuf as UnsignedInteger
    Public Volatile CCCBuf as UnsignedInteger
    Public Volatile CCDBuf as UnsignedInteger
End Structure
Previous page Top Next page