Mercurial > public > ostc4
comparison Small_CPU/Src/baseCPU2.c @ 104:22a1094545f3 kittz
Tested and alive.
author | Dmitry Romanov <kitt@bk.ru> |
---|---|
date | Mon, 24 Dec 2018 16:15:02 +0300 |
parents | f5d2f02dc73f |
children | 68181cd61f20 |
comparison
equal
deleted
inserted
replaced
103:f5d2f02dc73f | 104:22a1094545f3 |
---|---|
368 } | 368 } |
369 SPI_synchronize_with_Master(); | 369 SPI_synchronize_with_Master(); |
370 MX_DMA_Init(); | 370 MX_DMA_Init(); |
371 MX_SPI1_Init(); | 371 MX_SPI1_Init(); |
372 MX_EXTI_wireless_Init(); | 372 MX_EXTI_wireless_Init(); |
373 SPI_Start_single_TxRx_with_Master(); | 373 // SPI_Start_single_TxRx_with_Master(); |
374 EXTI_Test_Button_Init(); | 374 EXTI_Test_Button_Init(); |
375 | 375 |
376 /* | 376 /* |
377 uint8_t dataWireless[64]; | 377 uint8_t dataWireless[64]; |
378 while(1) | 378 while(1) |
464 GPIO_Power_MainCPU_Init(); | 464 GPIO_Power_MainCPU_Init(); |
465 GPIO_Power_MainCPU_ON(); | 465 GPIO_Power_MainCPU_ON(); |
466 compass_init(0, 7); | 466 compass_init(0, 7); |
467 accelerator_init(); | 467 accelerator_init(); |
468 wireless_init(); | 468 wireless_init(); |
469 SPI_synchronize_with_Master(); | 469 SPI_synchronize_with_Master(); //one manual start cycle. |
470 MX_DMA_Init(); | 470 MX_DMA_Init(); |
471 MX_SPI1_Init(); | 471 MX_SPI1_Init(); |
472 MX_EXTI_wireless_Init(); | 472 MX_EXTI_wireless_Init(); |
473 SPI_Start_single_TxRx_with_Master(); | 473 // SPI_Start_single_TxRx_with_Master(); |
474 | 474 |
475 // EXTILine0_Button_DeInit(); not now, later after testing | 475 // EXTILine0_Button_DeInit(); not now, later after testing |
476 break; | 476 break; |
477 } | 477 } |
478 } | 478 } |
1077 #endif | 1077 #endif |
1078 | 1078 |
1079 /** | 1079 /** |
1080 * @} | 1080 * @} |
1081 */ | 1081 */ |
1082 | 1082 /** |
1083 * @brief This function handles SysTick Handler. | |
1084 * @param None | |
1085 * @retval None | |
1086 */ | |
1087 | |
1088 /*TxRx only here. Every 100 ms.*/ | |
1089 uint8_t ticks100ms=0; | |
1090 void SysTick_Handler(void) | |
1091 { | |
1092 HAL_IncTick(); | |
1093 if(ticks100ms<100){ | |
1094 ticks100ms++; | |
1095 }else | |
1096 { | |
1097 ticks100ms=0; | |
1098 SPI_Start_single_TxRx_with_Master(); | |
1099 } | |
1100 } | |
1083 /** | 1101 /** |
1084 * @} | 1102 * @} |
1085 */ | 1103 */ |
1086 | 1104 |
1087 /************************ (C) COPYRIGHT heinrichs weikamp *****END OF FILE****/ | 1105 /************************ (C) COPYRIGHT heinrichs weikamp *****END OF FILE****/ |