record(longout, "HAD:CTS:REG:$(NN)")
{
	field(DESC, "Read cts register $(NN) ")
	field(SCAN,"Passive")
	field(OUT, "0")
	field(FLNK, "HAD:CTS:REG:$(NN):SPLIT")
}
record(aSub, "HAD:CTS:REG:$(NN):SPLIT")
{
	field(DESC, "Split 32bit into 2 mbbo")
	field(INAM,"ctsRegInit")
	field(SNAM,"ctsRegSplit4")
	field(INPA, "HAD:CTS:REG:$(NN)")
	field(FTA, "LONG")
	field(NOA, "1")
	field(OUTA, "HAD:CTS:REG:$(NN):BYTE0 PP")
	field(FTVA, "LONG")
	field(NOVA, "1")
	field(OUTB, "HAD:CTS:REG:$(NN):BYTE1 PP")
	field(FTVB, "LONG")
	field(NOVB, "1")
	field(OUTC, "HAD:CTS:REG:$(NN):BYTE2 PP")
	field(FTVC, "LONG")
	field(NOVC, "1")
	field(OUTD, "HAD:CTS:REG:$(NN):BYTE3 PP")
	field(FTVD, "LONG")
	field(NOVD, "1")
}
record(longout, "HAD:CTS:REG:$(NN):BYTE0")
{
	field(DESC, "byte 0")
	field(OUT, "HAD:CTS:REG:$(NN):OUT:BYTE0 NPP")
}
record(longout, "HAD:CTS:REG:$(NN):BYTE1")
{
	field(DESC, "byte 1")
	field(OUT, "HAD:CTS:REG:$(NN):OUT:BYTE1 NPP")
}
record(longout, "HAD:CTS:REG:$(NN):BYTE2")
{
	field(DESC, "byte 2")
	field(OUT, "HAD:CTS:REG:$(NN):OUT:BYTE2 NPP")
}
record(longout, "HAD:CTS:REG:$(NN):BYTE3")
{
	field(DESC, "byte 3")
	field(OUT, "HAD:CTS:REG:$(NN):OUT:BYTE3 NPP")
}
record(longout, "HAD:CTS:REG:$(NN):OUT:BYTE0")
{
	field(DESC, "byte 0")
	field(OUT, "0")
	field(UDF, "0")
	field(STAT, "NO_ALARM")
	field(SEVR, "NO_ALARM")
	field(FLNK, "HAD:CTS:REG:$(NN):UNSPLIT")
}
record(longout, "HAD:CTS:REG:$(NN):OUT:BYTE1")
{
	field(DESC, "byte 1")
	field(OUT, "0")
	field(UDF, "0")
	field(STAT, "NO_ALARM")
	field(SEVR, "NO_ALARM")
	field(FLNK, "HAD:CTS:REG:$(NN):UNSPLIT")
}
record(longout, "HAD:CTS:REG:$(NN):OUT:BYTE2")
{
	field(DESC, "byte 2")
	field(OUT, "0")
	field(UDF, "0")
	field(STAT, "NO_ALARM")
	field(SEVR, "NO_ALARM")
	field(FLNK, "HAD:CTS:REG:$(NN):UNSPLIT")
}
record(longout, "HAD:CTS:REG:$(NN):OUT:BYTE3")
{
	field(DESC, "byte 3")
	field(OUT, "0")
	field(UDF, "0")
	field(STAT, "NO_ALARM")
	field(SEVR, "NO_ALARM")
	field(FLNK, "HAD:CTS:REG:$(NN):UNSPLIT")
}
record(aSub, "HAD:CTS:REG:$(NN):UNSPLIT")
{
	field(DESC, "UnSplit 4 8bit into 1 long")
	field(INAM,"ctsRegInit")
	field(SNAM,"ctsRegUnsplit4")
	field(INPA, "HAD:CTS:REG:$(NN):OUT:BYTE0")
	field(FTA, "LONG")
	field(NOA, "1")
	field(INPB, "HAD:CTS:REG:$(NN):OUT:BYTE1")
	field(FTB, "LONG")
	field(NOB, "1")
	field(INPC, "HAD:CTS:REG:$(NN):OUT:BYTE2")
	field(FTC, "LONG")
	field(NOC, "1")
	field(INPD, "HAD:CTS:REG:$(NN):OUT:BYTE3")
	field(FTD, "LONG")
	field(NOD, "1")
	field(OUTA, "HAD:CTS:REG:$(NN):OUT PP")
	field(FTVA, "LONG")
	field(NOVA, "1")
}
record(longout, "HAD:CTS:REG:$(NN):OUT")
{
	field(DESC, "Read cts register $(NN) ")
	field(SCAN,"Passive")
	field(OUT, "0")
	field(FLNK, "HAD:CTS:REG:$(NN):Write")
	field(UDF, "0")
	field(STAT, "NO_ALARM")
	field(SEVR, "NO_ALARM")
}
record(aSub, "HAD:CTS:REG:$(NN):Write")
{
	field(DESC, "Write CTS Register")
	field(SCAN,"Passive")
	field(INAM,"mytrbInit")
	field(SNAM,"mytrbWrite")
	field(INPA, "0x0003")
	field(FTA, "LONG")
	field(NOA, "1")
	field(INPB, "$(NN)")
	field(FTB, "LONG")
	field(NOB, "1")
	field(INPC, "HAD:CTS:REG:$(NN):OUT")
	field(FTC, "LONG")
	field(NOC, "1")
}
