fixed bugs in shutter; need to check its work and finish readme

This commit is contained in:
2023-12-07 18:02:30 +03:00
parent c9a264c46b
commit 33e4eb9e6a
16 changed files with 236 additions and 94 deletions

View File

@@ -35,16 +35,15 @@ void sys_tick_handler(void){
int main(void){
char inbuff[MAXSTRLEN+1];
StartHSE();
hw_setup();
SysTick_Config(72000);
USBPU_OFF();
hw_setup();
flashstorage_init();
hw_setup();
USB_setup();
// close shutter and only after that turn on USB pullup
while(!close_shutter() && Tms < the_conf.waitingtime) IWDG->KR = IWDG_REFRESH;
USBPU_ON();
close_shutter();
uint32_t Terr = Tms + 2*ERRPERIOD;
while(1){
IWDG->KR = IWDG_REFRESH; // refresh watchdog