why use pin signals?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

why use pin signals?

跳至解决方案
1,034 次查看
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 解答
845 次查看
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 回复数
846 次查看
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 项奖励
回复
845 次查看
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 项奖励
回复