This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2530: point and osal_mem_alloc usage in Z-Stack

Part Number: CC2530
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