Rev 320 | Rev 327 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 320 | Rev 324 | ||
---|---|---|---|
Line 304... | Line 304... | ||
304 | } |
304 | } |
Line 305... | Line 305... | ||
305 | 305 | ||
306 | //---------------------------------------------------------------------------------------------------- |
306 | //---------------------------------------------------------------------------------------------------- |
307 | int main(void) |
307 | int main(void) |
- | 308 | { |
|
- | 309 | /* |
|
- | 310 | static u32 ftimer =0; |
|
- | 311 | static u8 fstate = 0; |
|
- | 312 | static File_t* f = NULL; |
|
- | 313 | */ |
|
308 | { |
314 | |
309 | /* Configure the system clocks */ |
315 | /* Configure the system clocks */ |
310 | SCU_Config(); |
316 | SCU_Config(); |
311 | /* init VIC (Vectored Interrupt Controller) */ |
317 | /* init VIC (Vectored Interrupt Controller) */ |
312 | SCU_AHBPeriphClockConfig(__VIC,ENABLE); // enable AHB bus clock for VIC |
318 | SCU_AHBPeriphClockConfig(__VIC,ENABLE); // enable AHB bus clock for VIC |
Line 402... | Line 408... | ||
402 | else NCFlags &= ~NC_FLAG_NOSERIALLINK; |
408 | else NCFlags &= ~NC_FLAG_NOSERIALLINK; |
403 | if(StopNavigation && (Parameter.NaviGpsModeControl >= 50) && (Parameter.GlobalConfig & FC_CFG_GPS_AKTIV)) BeepTime = 1000; |
409 | if(StopNavigation && (Parameter.NaviGpsModeControl >= 50) && (Parameter.GlobalConfig & FC_CFG_GPS_AKTIV)) BeepTime = 1000; |
404 | } |
410 | } |
405 | // ---------------- Logging --------------------------------------- |
411 | // ---------------- Logging --------------------------------------- |
406 | Logging_Update(); // could be block some time for at max. 2 seconds, therefore move time critical part of the mainloop into the ISR of timer 1 |
412 | Logging_Update(); // could be block some time for at max. 2 seconds, therefore move time critical part of the mainloop into the ISR of timer 1 |
- | 413 | /* |
|
- | 414 | // test |
|
- | 415 | if(CheckDelay(ftimer)) |
|
- | 416 | { |
|
- | 417 | ||
- | 418 | s8* filename = "test.txt"; |
|
- | 419 | ||
- | 420 | ftimer = SetDelay(100); |
|
- | 421 | if(FC.Poti[3]>100 && fstate == 0) |
|
- | 422 | { |
|
- | 423 | fstate = 1; |
|
- | 424 | } |
|
- | 425 | else if(FC.Poti[3]<100 && fstate == 2) |
|
- | 426 | { |
|
- | 427 | fstate = 3; |
|
- | 428 | } |
|
- | 429 | ||
- | 430 | switch(fstate) |
|
- | 431 | { |
|
- | 432 | case 1: |
|
- | 433 | sprintf(text,"\r\nStart writing file: %s", filename); |
|
- | 434 | UART1_PutString(text); |
|
- | 435 | f = fopen_(filename, 'a'); |
|
- | 436 | if(f== NULL) Fat16_Init(); |
|
- | 437 | fstate = 2; |
|
- | 438 | break; |
|
- | 439 | ||
- | 440 | case 2: |
|
- | 441 | fputs_("\r\ntest edins sdv dsivbds iv dsivb disbv idsv bisd bv d suiv dsibsivbdis fbvisdöb visdbvisdb vidbfibds ibv", f); |
|
- | 442 | break; |
|
- | 443 | |
|
- | 444 | case 3: |
|
- | 445 | sprintf(text,"\r\nClosing file: %s", filename); |
|
- | 446 | UART1_PutString(text); |
|
- | 447 | fclose_(f); |
|
- | 448 | fstate = 0; |
|
- | 449 | break; |
|
- | 450 | ||
- | 451 | default: |
|
- | 452 | break; |
|
- | 453 | } |
|
- | 454 | } |
|
- | 455 | */ |
|
407 | } |
456 | } |
408 | } |
457 | } |