comparison Discovery/Src/tComm.c @ 879:fe955104901c Evo_2_23

new bluetooth work, bootloader work
author heinrichsweikamp
date Thu, 29 Aug 2024 12:03:10 +0200
parents e373e90a48db
children d398ecc7d103
comparison
equal deleted inserted replaced
878:6b06143cbfea 879:fe955104901c
2214 case BM_INIT_TRIGGER_OFF: HAL_Delay(1); 2214 case BM_INIT_TRIGGER_OFF: HAL_Delay(1);
2215 HAL_GPIO_WritePin(BLE_UBLOX_DSR_GPIO_PORT,BLE_UBLOX_DSR_PIN,GPIO_PIN_SET); 2215 HAL_GPIO_WritePin(BLE_UBLOX_DSR_GPIO_PORT,BLE_UBLOX_DSR_PIN,GPIO_PIN_SET);
2216 HAL_Delay(2000); 2216 HAL_Delay(2000);
2217 BmTmpConfig++; 2217 BmTmpConfig++;
2218 break; 2218 break;
2219 case BM_INIT_ECHO: sprintf(TxBuffer,"ATE0\r");
2220 break;
2219 case BM_INIT_FACTORY: sprintf(TxBuffer,"AT+UFACTORY\r"); /*Set to factory defined configuration */ 2221 case BM_INIT_FACTORY: sprintf(TxBuffer,"AT+UFACTORY\r"); /*Set to factory defined configuration */
2220 break; 2222 break;
2221 case BM_INIT_MODE: sprintf(TxBuffer,"AT+UMSM=1\r"); /* start in Data mode */ 2223 case BM_INIT_MODE: sprintf(TxBuffer,"AT+UMSM=1\r"); /* start in Data mode */
2222 break; 2224 break;
2223 case BM_INIT_BLE: sprintf(TxBuffer,"AT+UBTLE=2\r"); /* Bluetooth low energy Peripheral */ 2225 case BM_INIT_BLE: sprintf(TxBuffer,"AT+UBTLE=2\r"); /* Bluetooth low energy Peripheral */
2271 } 2273 }
2272 if(result == HAL_OK) 2274 if(result == HAL_OK)
2273 { 2275 {
2274 BmTmpConfig++; 2276 BmTmpConfig++;
2275 } 2277 }
2276 if(BmTmpConfig == BM_CONFIG_DONE) 2278 if(BmTmpConfig == BM_CONFIG_ECHO)
2277 { 2279 {
2280 BmTmpConfig = BM_CONFIG_DONE;
2278 ConfigRetryCnt = 0; 2281 ConfigRetryCnt = 0;
2279 RestartModule = 1; 2282 RestartModule = 1;
2280 } 2283 }
2281 } 2284 }
2282 } 2285 }