User_Control.c 659 B

123456789101112131415161718192021222324252627282930313233343536
  1. #include "DSP2803x_Device.h" // DSP2803x Headerfile Include File
  2. #include "DSP2803x_Examples.h" // DSP2803x Examples Include File
  3. #define RUNLEDSHORT 5000000 //0.2s
  4. void RunLedControl(void)
  5. {
  6. static int32 i = 0;
  7. int32 RunLedPeriod = 0;
  8. static int16 State = 0;
  9. RunLedPeriod = RUNLEDSHORT;
  10. i++;
  11. if (i >= RunLedPeriod)
  12. {
  13. i = 0;
  14. if (State == 0)
  15. {
  16. State = 1;
  17. RunLedSet();
  18. }
  19. else
  20. {
  21. State = 0;
  22. RunLedClr();
  23. }
  24. }
  25. }
  26. //===========================================================================
  27. // No more.
  28. //===========================================================================