This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

what is the matter with the pointer?

hello all!

*.h
void Baudrate(unsigned int *ptr,unsigned char Uart_num) large;

*.c

void main(void)
{
...
*ptr = 1152;
Baudrate(ptr,1);
...
}
In the routine ,the var Baud( Baud = *ptr; )is not 1152 but 0x00.When changing the defintion : void Baudrate(unsigned int pp,unsigned char Uart_num) large;,and be called : Baudrate(1152,1);,the routine run well.
What is the wrong?

0