EEPROM and USB CDC

This commit is contained in:
2024-09-11 00:32:41 +03:00
parent beb5ed6be3
commit 419c55d807
8 changed files with 336 additions and 225 deletions

View File

@ -176,11 +176,11 @@ int main(void)
// BufShots[1] = GetShot(0);
initcomlete = 1;
Shiftreg[0] = 0x00; Shiftreg[1] = 0x44; Shiftreg[2] = 0x00; SetShiftReg(Shiftreg); HAL_Delay(10);
Shiftreg[0] = 0x00; Shiftreg[1] = 0x66; Shiftreg[2] = 0x00; SetShiftReg(Shiftreg); HAL_Delay(10);
Shiftreg[0] = 0x00; Shiftreg[1] = 0x77; Shiftreg[2] = 0x00; SetShiftReg(Shiftreg); HAL_Delay(10);
EEPROM_INIT();
Shiftreg[0] = 0x01; Shiftreg[1] = 0x77; Shiftreg[2] = 0x01; SetShiftReg(Shiftreg); HAL_Delay(10);
Shiftreg[0] = 0x03; Shiftreg[1] = 0x77; Shiftreg[2] = 0x03; SetShiftReg(Shiftreg); HAL_Delay(10);
Shiftreg[0] = 0x07; Shiftreg[1] = 0x77; Shiftreg[2] = 0x07; SetShiftReg(Shiftreg); HAL_Delay(10);
@ -190,6 +190,7 @@ initcomlete = 1;
Shiftreg[0] = 0x7F; Shiftreg[1] = 0x77; Shiftreg[2] = 0x7F; SetShiftReg(Shiftreg); HAL_Delay(10);
Shiftreg[0] = 0x00; Shiftreg[1] = 0x00; Shiftreg[2] = 0x00; SetShiftReg(Shiftreg); HAL_Delay(10);
initcomlete = 1;
HAL_TIM_IC_Start_IT(&htim3, TIM_CHANNEL_1); // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 1 <20>6 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> PA0 PA1
@ -203,6 +204,8 @@ initcomlete = 1;
/* Infinite loop */
/* USER CODE BEGIN WHILE */
Shot testShot;
memset(&testShot, 0x00, sizeof(Shot));
getShot(3, &testShot);