ZBasic Language Reference
173
ZBasic Microcontrollers
' For accessing 16-bit timers (Type 1):
Structure TC1_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 unused5(1 to 10) as Byte
Public Volatile PerBuf as UnsignedInteger
Public Volatile CCABuf as UnsignedInteger
Public Volatile CCBBuf as UnsignedInteger
End Structure
' For accessing USARTs:
Structure USART_t
Public Volatile Data as Byte
Public Volatile Status as Byte
Public Volatile unused1 as Byte
Public Volatile CtrlA as Byte
Public Volatile CtrlB as Byte
Public Volatile CtrlC as Byte
Public Volatile BaudCtrlA as Byte
Public Volatile BaudCtrlB as Byte
End Structure
' For representing Microtime:
Structure Microtime_t
Public Volatile timerTicks as UnsignedInteger
Public Volatile fastTicks UnsignedLong
End Structure
|