dRonin  adbada4
dRonin firmware
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
pios_board.h
Go to the documentation of this file.
1 
14 /*
15  * This program is free software; you can redistribute it and/or modify
16  * it under the terms of the GNU General Public License as published by
17  * the Free Software Foundation; either version 3 of the License, or
18  * (at your option) any later version.
19  *
20  * This program is distributed in the hope that it will be useful, but
21  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
22  * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
23  * for more details.
24  *
25  * You should have received a copy of the GNU General Public License along
26  * with this program; if not, see <http://www.gnu.org/licenses/>
27  */
28 
29 
30 #ifndef _FLYINGPIO_PIOS_BOARD_H
31 #define _FLYINGPIO_PIOS_BOARD_H
32 
33 #include <stdbool.h>
34 
35 //------------------------
36 // PIOS_LED
37 //------------------------
38 #define PIOS_LED_HEARTBEAT 0
39 
40 //------------------------
41 // PIOS_WDG
42 //------------------------
43 #define PIOS_WATCHDOG_TIMEOUT 125
44 
45 //-------------------------
46 // System Settings
47 //-------------------------
48 
49 #define PIOS_SYSCLK 40000000
50 #define PIOS_PERIPHERAL_APB1_CLOCK (PIOS_SYSCLK)
51 
52 
53 //-------------------------
54 // Interrupt Priorities
55 //-------------------------
56 #define PIOS_IRQ_PRIO_LOW 12 // lower than RTOS
57 #define PIOS_IRQ_PRIO_MID 8 // higher than RTOS
58 #define PIOS_IRQ_PRIO_HIGH 5 // for SPI, ADC, I2C etc...
59 #define PIOS_IRQ_PRIO_HIGHEST 4 // for USART etc...
60 #define PIOS_IRQ_PRIO_EXTREME 0 // for I2C
61 
62 //------------------------
63 // PIOS_RCVR
64 // See also pios_board.c
65 //------------------------
66 #define PIOS_RCVR_MAX_CHANNELS 12
67 
68 //-------------------------
69 // Receiver PPM input
70 //-------------------------
71 #define PIOS_PPM_NUM_INPUTS 12
72 
73 //-------------------------
74 // Receiver DSM input
75 //-------------------------
76 #define PIOS_DSM_NUM_INPUTS 12
77 
78 //-------------------------
79 // Reciever HSUM input
80 //-------------------------
81 #define PIOS_HSUM_MAX_DEVS 1
82 #define PIOS_HSUM_NUM_INPUTS 32
83 
84 //-------------------------
85 // Receiver S.Bus input
86 //-------------------------
87 #define PIOS_SBUS_NUM_INPUTS (16+2)
88 
89 //-------------------------
90 // Servo outputs
91 //-------------------------
92 #define PIOS_SERVO_UPDATE_HZ 50
93 #define PIOS_SERVOS_INITIAL_POSITION 0 /* dont want to start motors, have no pulse till settings loaded */
94 
95 //--------------------------
96 // Timer controller settings
97 //--------------------------
98 #define PIOS_TIM_MAX_DEVS 3
99 
100 //-------------------------
101 // ADC
102 //-------------------------
103 
104 #if defined(PIOS_INCLUDE_ADC)
105 extern uintptr_t pios_internal_adc_id;
106 #define pios_internal_adc_id (pios_internal_adc_id)
107 #endif
108 #define PIOS_ADC_SUB_DRIVER_MAX_INSTANCES 1
109 
110 #define VREF_PLUS 3.3
111 
112 #endif /* _FLYINGPIO_PIOS_BOARD_H */
113 
uintptr_t pios_internal_adc_id
Definition: pios_board.c:51