Add tasks for all the new languages
This commit is contained in:
parent
9dc3c2bb62
commit
bba7bfd280
13208 changed files with 134745 additions and 0 deletions
|
|
@ -0,0 +1,17 @@
|
|||
' FB 1.05.0 Win64
|
||||
|
||||
' using bit fields
|
||||
Type RS232_Pin9
|
||||
carrierDetect : 1 As UByte
|
||||
receivedData : 1 As UByte
|
||||
transmittedData : 1 As UByte
|
||||
dataTerminalReady : 1 As UByte
|
||||
signalGround : 1 As UByte
|
||||
dataSetReady : 1 As UByte
|
||||
requestToSend : 1 As UByte
|
||||
clearToSend : 1 As UByte
|
||||
ringIndicator : 1 As UByte
|
||||
End Type
|
||||
|
||||
Print SizeOf(RS232_Pin9) '' 2 bytes
|
||||
Sleep
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
type
|
||||
rs232Data = enum
|
||||
carrierDetect,
|
||||
receivedData,
|
||||
transmittedData,
|
||||
dataTerminalReady,
|
||||
signalGround,
|
||||
dataSetReady,
|
||||
requestToSend,
|
||||
clearToSend,
|
||||
ringIndicator
|
||||
|
||||
# Bit vector of 9 bits
|
||||
var bv = {carrierDetect, signalGround, ringIndicator}
|
||||
echo cast[uint16](bv) # Conversion of bitvector to 2 bytes for writing
|
||||
|
||||
let readValue: uint16 = 123
|
||||
bv = cast[set[rs232Data]](readValue) # Conversion of a read value to bitvector
|
||||
echo bv
|
||||
Loading…
Add table
Add a link
Reference in a new issue