why use pin signals?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 
830件の閲覧回数
juliancox
Contributor V

Almost all of the pins on my MC9s08 CPU are associated with a component (Processor Expert) and in the component properties I have given each one a pin signal. e.g. for Bit1.BitIO the pin signal is Button_1. How can I use the Pin Signal to make my code more readable? For example: - can I use "if (Button_1)....." instead of "if (Bit1.GetVal()).....". If the answer is no, what is the purpose of Pin Signals?

0 件の賞賛
1 解決策
641件の閲覧回数
juliancox
Contributor V

Thanks Erich, I did not realise that I could change the component name, so now I will change all of the names. I have 15 BitIO components and I keep forgetting which one does what - so problem solved`!

元の投稿で解決策を見る

0 件の賞賛
2 返答(返信)
642件の閲覧回数
juliancox
Contributor V

Thanks Erich, I did not realise that I could change the component name, so now I will change all of the names. I have 15 BitIO components and I keep forgetting which one does what - so problem solved`!

0 件の賞賛
641件の閲覧回数
BlackNight
NXP Employee
NXP Employee

Hi Julian,

the signal name is used for documentation purpose only, see the signals text file inside the generated Documentation folder.

But you can give the component any name you want:

pastedImage_1.png

So you could name it 'Button1' and then you can use 'Button1_GetVal()' and so on.

I hope this helps,

Erich

0 件の賞賛