Component creation from Leigh

For questions and comments on programming in general. And for any items that don't fit into the forums below.

Moderators: Benj, Mods

Post Reply
User avatar
QMESAR
Valued Contributor
Valued Contributor
Posts: 1287
Joined: Sun Oct 05, 2014 3:20 pm
Location: Russia
Has thanked: 384 times
Been thanked: 614 times
Contact:

Component creation from Leigh

Post by QMESAR »

Hi All.

I have to apologize the old man is losing his brain :oops:
I am folloing the document(tutorial from Leigh/Dave) to create your own component however I seam to get stuck on an issue which is for your guys an automatic/general knowledge thing.
I seam to not get it in the ReadINT Makro the i2c1:Mater_RxByte(0) is fine this I get however the returned value is into variable .HB and .LB which I suppose is high byte and low byte but where did we set them up ?
This makro has an parameter "Address" and a Return value of UINT which is clear as the .LB and .HB is made into a UINT that is eventually returned by the macro but where is .HB and .LB

Please help I am lost with this :oops:) I feel terrible)
Component102.jpg
Component102.jpg (26.19 KiB) Viewed 2887 times
I got this far and seamed to follow what has been done but I got stuck :shock:
Component101.jpg
Component101.jpg (109.83 KiB) Viewed 2887 times
I always appreciate all help and pointers

kersing
Valued Contributor
Valued Contributor
Posts: 2045
Joined: Wed Aug 27, 2008 10:31 pm
Location: Netherlands
Has thanked: 553 times
Been thanked: 1081 times
Contact:

Re: Component creation from Leigh

Post by kersing »

It looks like .HB and .LB are local variables of the macro. Any variable starting with a dot ('.') is local to the current macro. (So not available in any other macro or the main code)
“Integrity is doing the right thing, even when no one is watching.”

― C.S. Lewis

User avatar
QMESAR
Valued Contributor
Valued Contributor
Posts: 1287
Joined: Sun Oct 05, 2014 3:20 pm
Location: Russia
Has thanked: 384 times
Been thanked: 614 times
Contact:

Re: Component creation from Leigh

Post by QMESAR »

@Kersing.

Thank you very much this helps me going forward ,I appreciate your help :D

User avatar
QMESAR
Valued Contributor
Valued Contributor
Posts: 1287
Joined: Sun Oct 05, 2014 3:20 pm
Location: Russia
Has thanked: 384 times
Been thanked: 614 times
Contact:

Re: Component creation from Leigh

Post by QMESAR »

I am very happy now I got this tutorial working now :D
I will build on ths basic knowledge now to make components I need as they say practice makes perfect
I am still at the practice stage :D
Again Thank you Kersing for helping me out on the .variable issue now it is clear :D :D :D

Post Reply