I think you have already posted the answer:
for bits in [8,16,32]
name = Symbol("D",bits)
t = Symbol("UInt", bits)
@eval struct $name
addr::UInt32
data::$t
end
end
I think you have already posted the answer:
for bits in [8,16,32]
name = Symbol("D",bits)
t = Symbol("UInt", bits)
@eval struct $name
addr::UInt32
data::$t
end
end