Hello!
In the Test.Lib Library I am creating a function, which set a specific port and pin. The port and pin must be defined in the project to which i have added Test.Lib
In Library Project, I have Test.C
Test.C ======= extern char Port; extern bit pin; void func(unsigned char ch, bit bt) { Port = ch; pin = bt; }
the Test.Lib is successfully compiled and generated the .Lib file. Now I added this .Lib file to my working project. The main file look like this.
main.c ======
#define Port P1 sbit pin = P0^0;
void func(unsigned char ch, bit bt); //Prototype
void main(void) { func(0x55,1); while(1); }
It doest not set the desired values to Port and Pin. Please help me in this regard.
Thanks. with regards. SAJJAD