Subversion Repositories FlightCtrl

Rev

Rev 1967 | Rev 2052 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1967 Rev 2015
1
#ifndef _TIMER0_H
1
#ifndef _TIMER0_H
2
#define _TIMER0_H
2
#define _TIMER0_H
3
 
3
 
4
#include <inttypes.h>
4
#include <inttypes.h>
5
 
5
 
6
#define BEEP_MODULATION_NONE 0xFFFF
6
#define BEEP_MODULATION_NONE 0xFFFF
7
#define BEEP_MODULATION_RCALARM 0x0C00
7
#define BEEP_MODULATION_RCALARM 0x0C00
8
#define BEEP_MODULATION_I2CALARM 0x0080
8
#define BEEP_MODULATION_I2CALARM 0x0080
9
#define BEEP_MODULATION_BATTERYALARM 0x0300
9
#define BEEP_MODULATION_BATTERYALARM 0x0300
10
#define BEEP_MODULATION_EEPROMALARM 0x0007
10
#define BEEP_MODULATION_EEPROMALARM 0x0007
11
 
11
 
12
extern volatile uint16_t millisecondsCount;
12
extern volatile uint16_t millisecondsCount;
13
extern volatile uint8_t  runFlightControl;
13
extern volatile uint8_t  runFlightControl;
14
extern volatile uint16_t cntKompass;
14
extern volatile uint16_t cntKompass;
15
extern volatile uint16_t beepModulation;
15
extern volatile uint16_t beepModulation;
16
extern volatile uint16_t beepTime;
16
extern volatile uint16_t beepTime;
17
#ifdef USE_NAVICTRL
17
#ifdef USE_NAVICTRL
18
extern volatile uint8_t SendSPI;
18
extern volatile uint8_t SendSPI;
19
#endif
19
#endif
20
 
20
 
21
extern void timer0_init(void);
21
extern void timer0_init(void);
22
extern void delay_ms(uint16_t w);
22
extern void delay_ms(uint16_t w);
23
extern void delay_ms_with_adc_measurement(uint16_t w);
23
extern void delay_ms_with_adc_measurement(uint16_t w, uint8_t stop);
24
extern uint16_t setDelay(uint16_t t);
24
extern uint16_t setDelay(uint16_t t);
25
extern int8_t checkDelay(uint16_t t);
25
extern int8_t checkDelay(uint16_t t);
26
 
26
 
27
#endif //_TIMER0_H
27
#endif //_TIMER0_H
28
 
28