]> rtime.felk.cvut.cz Git - eurobot/public.git/blob - src/eb_pwr/pwrstep.h
robomon: Implement motor simulation
[eurobot/public.git] / src / eb_pwr / pwrstep.h
1 #ifndef PWRSTEP_H\r
2 #define PWRSTEP_H\r
3 \r
4 #define PWR_ON  1\r
5 #define PWR_OFF 0\r
6 \r
7 #define ADC_DIV 10\r
8 #define ADC_CON_CONST 322\r
9 #define ADC_OFFSET      2000\r
10 \r
11 \r
12         volatile unsigned int adc_val[4];\r
13 \r
14 /**     pwr_33 Switch on/off 3,3V power line\r
15  *  @param mode  -  PWR_ON/PWR_OFF \r
16  */\r
17 void pwr_33(char mode);\r
18 \r
19 /**     pwr_50 Switch on/off 5,0V power line\r
20  *  @param mode  -  PWR_ON/PWR_OFF \r
21  */\r
22 void pwr_50(char mode);\r
23 \r
24 /**     pwr_80 Switch on/off 8,0V power line\r
25  *  @param mode  -  PWR_ON/PWR_OFF \r
26  */\r
27 void pwr_80(char mode);\r
28 \r
29 /**     init_pwr  inicializes power lines - default: all lines is off\r
30  */\r
31 void init_pwr(void);\r
32 \r
33 \r
34 /**     inicializes ADC lines and starts converion (use ISR)\r
35  *  @param rx_isr_vect  ISR vector\r
36  */\r
37 void init_adc(unsigned rx_isr_vect);\r
38 \r
39 \r
40 #endif\r