src/user_main.c
/******************************************************************************
 * FunctionName : user_init
 * Description  : entry of user application, init user function here
 * Parameters   : none
 * Returns      : none
*******************************************************************************/
FunctionName : user_init
Description  : entry of user application, init user function here
Parameters   : none
Returns      : none
FunctionName : user_init Description : entry of user application init user function here Parameters : none Returns : none
void user_init(void)
{
  UART_ConfigTypeDef uart_config;
  uart_config.baud_rate = BIT_RATE_74880; 
  uart_config.data_bits = UART_WordLength_8b;
  uart_config.parity = USART_Parity_None;
  uart_config.stop_bits = USART_StopBits_1;
  uart_config.flow_ctrl = USART_HardwareFlowControl_None;
  uart_config.UART_RxFlowThresh = 120;
  uart_config.UART_InverseMask = UART_None_Inverse;
  UART_ParamConfig(UART0, &uart_config);
  UART_SetPrintPort(UART0); 
  printf(string_0);
  printf(string_1, system_get_sdk_version());
  printf(string_2, system_get_chip_id());
  printf("\nflash map: %d\n", user_rf_cal_sector_set());
  printf("Initializing SPIFFS");
  spiffs_fs1_init();
  printf("SPIFFS unmounted");
  xTaskCreate(&task_blink, (signed char *)"startup", 2048, NULL, 1, NULL);
  xTaskCreate(&httpd_task, (signed char *)"http_server", 1024, NULL, 2, NULL);
}
void user_init ( void ) { UART_ConfigTypeDef uart_config ; uart_config . baud_rate = BIT_RATE_74880 ; uart_config . data_bits = UART_WordLength_8b ; uart_config . parity = USART_Parity_None ; uart_config . stop_bits = USART_StopBits_1 ; uart_config . flow_ctrl = USART_HardwareFlowControl_None ; uart_config . UART_RxFlowThresh = 120 ; uart_config . UART_InverseMask = UART_None_Inverse ; UART_ParamConfig ( UART0 , & uart_config ) ; UART_SetPrintPort ( UART0 ) ; printf ( string_0 ) ; printf ( string_1 , system_get_sdk_version ( ) ) ; printf ( string_2 , system_get_chip_id ( ) ) ; printf ( " \n \n " , user_rf_cal_sector_set ( ) ) ; printf ( " " ) ; spiffs_fs1_init ( ) ; printf ( " " ) ; xTaskCreate ( & task_blink , ( signed char * ) " " , 2048 , NULL , 1 , NULL ) ; xTaskCreate ( & httpd_task , ( signed char * ) " " , 1024 , NULL , 2 , NULL ) ; }
FunctionName : user_init
 Description  : entry of user application, init user function here
 Parameters   : none
 Returns      : none
FunctionName : user_init Description : entry of user application init user function here Parameters : none Returns : none
//BIT_RATE_19200;//BIT_RATE_115200; // select UART0 //spiffs init //task create