AS1_TComData

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 
1,666件の閲覧回数
tmyint
Contributor I
hi,

this is HC08 CW v5.0.
the sending and receiving function code that ESCI and SPI beans generate,
AS1_SendChar(AS1_TComData Chr)
why is the datatype defined/called AS1_TcomData ? Why can't it just be called byte or char?
I found the typedef declaration somewhere in one of the files in the project.
ラベル(1)
タグ(1)
0 件の賞賛
返信
1 解決策
615件の閲覧回数
CompilerGuru
NXP Employee
NXP Employee
The typedef does make sense, when you use an SCI in 9 bit mode, then AS1_TComData is typedefed to word, not to byte anymore.
So with the typedef the code works independently of this setting.
If you want to use byte in your code, well that's actually even compatible as in C typedefs do not introduce new types, they just introduce an alias to an existing type. Of course then your code will fail with a 9 bit SCI.

Daniel

元の投稿で解決策を見る

0 件の賞賛
返信
1 返信
616件の閲覧回数
CompilerGuru
NXP Employee
NXP Employee
The typedef does make sense, when you use an SCI in 9 bit mode, then AS1_TComData is typedefed to word, not to byte anymore.
So with the typedef the code works independently of this setting.
If you want to use byte in your code, well that's actually even compatible as in C typedefs do not introduce new types, they just introduce an alias to an existing type. Of course then your code will fail with a 9 bit SCI.

Daniel
0 件の賞賛
返信