Browse Source

可以进入主程序,准备调试网卡初始化问题

tags/修改需求前并且硬件测试除rs485都通过的版本
tianjialong 2 years ago
parent
commit
e70e71513c
  1. 64
      MDK-ARM/LWIP.uvguix.29643
  2. 4
      Src/freertos.c
  3. 6
      Src/main.c
  4. 5
      usersrc/usermain.c

64
MDK-ARM/LWIP.uvguix.29643
File diff suppressed because it is too large
View File

4
Src/freertos.c

@ -117,7 +117,7 @@ void vApplicationGetIdleTaskMemory( StaticTask_t **ppxIdleTaskTCBBuffer, StackTy
*/ */
void MX_FREERTOS_Init(void) { void MX_FREERTOS_Init(void) {
/* USER CODE BEGIN Init */ /* USER CODE BEGIN Init */
config_init();
// config_init();
/* USER CODE END Init */ /* USER CODE END Init */
/* USER CODE BEGIN RTOS_MUTEX */ /* USER CODE BEGIN RTOS_MUTEX */
@ -157,7 +157,7 @@ void MX_FREERTOS_Init(void) {
void StartDefaultTask(void const * argument) void StartDefaultTask(void const * argument)
{ {
/* init code for LWIP */ /* init code for LWIP */
MX_LWIP_Init();
// MX_LWIP_Init();
/* USER CODE BEGIN StartDefaultTask */ /* USER CODE BEGIN StartDefaultTask */
osThreadDef(mainTask, StartMainTask, osPriorityNormal, 0, 1024); osThreadDef(mainTask, StartMainTask, osPriorityNormal, 0, 1024);
mainTaskHandle = osThreadCreate(osThread(mainTask), NULL); mainTaskHandle = osThreadCreate(osThread(mainTask), NULL);

6
Src/main.c

@ -96,16 +96,14 @@ int main(void)
MX_TIM4_Init(); MX_TIM4_Init();
MX_TIM8_Init(); MX_TIM8_Init();
/* USER CODE BEGIN 2 */ /* USER CODE BEGIN 2 */
extern void user_main();
user_main();
/* USER CODE END 2 */ /* USER CODE END 2 */
/* Call init function for freertos objects (in freertos.c) */ /* Call init function for freertos objects (in freertos.c) */
// MX_FREERTOS_Init();
MX_FREERTOS_Init();
/* Start scheduler */ /* Start scheduler */
// osKernelStart();
osKernelStart();
/* We should never get here as control is now taken by the scheduler */ /* We should never get here as control is now taken by the scheduler */
/* Infinite loop */ /* Infinite loop */

5
usersrc/usermain.c

@ -115,11 +115,8 @@ void user_main()
{ {
encoder_read_with_encoder(CAMERA_ENCODER, &camera_encoder_data); encoder_read_with_encoder(CAMERA_ENCODER, &camera_encoder_data);
encoder_read_with_encoder(DRIVEN_ENCODER_GEAR, &driven_encoder_data); encoder_read_with_encoder(DRIVEN_ENCODER_GEAR, &driven_encoder_data);
printf("camera encoder:%d,driven encoder:%d\r\n", camera_encoder_data, driven_encoder_data); printf("camera encoder:%d,driven encoder:%d\r\n", camera_encoder_data, driven_encoder_data);
HAL_Delay(1000);
// udp_client_genlock_and_esync_active(); // udp_client_genlock_and_esync_active();
// udp_client_active(); // udp_client_active();
// zkey_schedule(); // zkey_schedule();
@ -127,6 +124,6 @@ void user_main()
// at_cmd_processer_try_process_data(); // at_cmd_processer_try_process_data();
// encoder_light_schedule(); // encoder_light_schedule();
// port_do_debug_light_state(); // port_do_debug_light_state();
// osDelay(1);
osDelay(1000);
} }
} }
Loading…
Cancel
Save