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.
对于main 函数 想知道具体的初始化啦哪些参数
int main( void )
{
// Turn off interrupts
osal_int_disable( INTS_ALL );
// Initialization for board related stuff such as LEDs
//初始化板相关的东西,如led
HAL_BOARD_INIT();
// Make sure supply voltage is high enough to run
//确保电源电压足够高,以运行
zmain_vdd_check();
// Initialize board I/O
//初始化板I/O
InitBoard( OB_COLD );
// Initialze HAL drivers
//
HalDriverInit();
// Initialize NV System
//初始化NV系统
osal_nv_init( NULL );
// Initialize the MAC
//初始化MAC
ZMacInit();
// Determine the extended address
//确定扩展地址
zmain_ext_addr();
#if defined ZCL_KEY_ESTABLISH
// Initialize the Certicom certificate information.初始化Certicom证书信息。
zmain_cert_init();
#endif
// Initialize basic NV items 初始化基本NV条目
zgInit();
#ifndef NONWK
// Since the AF isn't a task, call it's initialization routine由于AF不是任务,因此请调用它的初始化例程
afInit();
#endif
// Initialize the operating system初始化操作系统
osal_init_system();
// Allow interrupts允许中断
osal_int_enable( INTS_ALL );
// Final board initialization最终的板初始化
InitBoard( OB_READY );
// Display information about this device显示有关此设备的信息
zmain_dev_info();
/* Display the device info on the LCD */ //在LCD上显示设备信息
#ifdef LCD_SUPPORTED
zmain_lcd_init();
#endif
#ifdef WDT_IN_PM1
/* If WDT is used, this is a good place to enable it. */ // 如果使用WDT,这是启用它的好地方
WatchDogEnable( WDTIMX );
#endif
osal_start_system(); // No Return from here没有从这里回来
return 0; // Shouldn't get here.
} // main()