Advertisement
teplofizik

slowtimer.h

Aug 7th, 2013
274
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.01 KB | None | 0 0
  1. // Раз уж пользуем stdint, так подключим его, а то другие модули могут его и не подключать, а ошибок нам не надо
  2. #include <stdint.h>
  3.  
  4. // Внешние модули пусть видят только самое жизненно необходимое - да и так проще потом вспоминать, что тут надо вызывать
  5. #ifndef SLOW_TIMER_H
  6. #define SLOW_TIMER_H
  7.  
  8.     // Настройки
  9.     #define SLOW_TIMER_COUNT                        10
  10.     #define SLOW_TIMER_NUMBER                       5                       //Timer name = TIMER5 or another
  11.     #define SLOW_TIMER_FREQUENCY                    500                     // 2..1000
  12.  
  13.     void Init_Slow_Timer(void);
  14.     int8_t Slow_Timer_Add(uint8_t mode, uint16_t counter, void (*handler)(void));
  15.     void Slow_Timer_Delete(int8_t index);
  16.     void Slow_Timer_Modify(int8_t index, uint8_t mode, uint16_t counter, uint16_t reload);
  17.        
  18. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement