Other Parts Discussed in Thread: Z-STACK,
Dear all,
I used cc2530 + Z-Stack 3.0. The following code cannot assign "6" to "g_ptr". Anyone knows what is the problem? Thank you much.
int *g_ptr; //global pointer
void test( int *p )
{
p = osal_mem_alloc(sizeof(int));
*p = 6;
}
void main(void) // I used main() to simplify my description. This should be a init function of a task e.g. zclSampleSw_Init()
{
test(g_ptr);
}
Best regards,
Barry