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 
15 /*
16  * This program is free software; you can redistribute it and/or modify
17  * it under the terms of the GNU General Public License as published by
18  * the Free Software Foundation; either version 3 of the License, or
19  * (at your option) any later version.
20  *
21  * This program is distributed in the hope that it will be useful, but
22  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
23  * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
24  * for more details.
25  *
26  * You should have received a copy of the GNU General Public License along
27  * with this program; if not, see <http://www.gnu.org/licenses/>
28  */
29 
30 #ifndef PIOS_BOARD_H
31 #define PIOS_BOARD_H
32 
33 
34 // PIOS_ADC
35 #define PIOS_ADC_SUB_DRIVER_MAX_INSTANCES 3
36 
37 //------------------------
38 // PIOS_LED
39 //------------------------
40 #define PIOS_LED_HEARTBEAT 0
41 #define PIOS_LED_ALARM 1
42 #define PIOS_ANNUNC_NUM 2
43 
44 //-------------------------
45 // COM
46 //
47 // See also pios_board_posix.c
48 //-------------------------
49 //#define PIOS_USART_TX_BUFFER_SIZE 256
50 #define PIOS_COM_BUFFER_SIZE 1024
51 #define PIOS_COM_MAX_DEVS 255
52 #define PIOS_UDP_RX_BUFFER_SIZE PIOS_COM_BUFFER_SIZE
53 #define PIOS_TCP_RX_BUFFER_SIZE PIOS_COM_BUFFER_SIZE
54 #define PIOS_SERIAL_RX_BUFFER_SIZE PIOS_COM_BUFFER_SIZE
55 
56 extern uintptr_t pios_com_telem_serial_id;
57 extern uintptr_t pios_com_telem_usb_id;
58 extern uintptr_t pios_com_gps_id;
59 extern uintptr_t pios_com_debug_id;
60 extern uintptr_t pios_com_openlog_id;
61 extern uintptr_t pios_com_lighttelemetry_id;
62 extern uintptr_t pios_com_msp_id;
63 
64 #define PIOS_COM_TELEM_USB (pios_com_telem_usb_id)
65 #define PIOS_COM_GPS (pios_com_gps_id)
66 #define PIOS_COM_MSP (pios_com_msp_id)
67 #define PIOS_COM_DEBUG (pios_com_debug_id)
68 #define PIOS_COM_OPENLOG (pios_com_openlog_id)
69 #define PIOS_COM_LIGHTTELEMETRY (pios_com_lighttelemetry_id)
70 
71 #ifndef DEBUG_LEVEL
72 #define DEBUG_LEVEL 2
73 #endif
74 
75 #define DEBUG_PRINTF(level, ...) do { if ((level) <= DEBUG_LEVEL) { fprintf(stderr, __VA_ARGS__); } } while (0)
76 
77 #endif /* PIOS_BOARD_H */
78 
uintptr_t pios_com_telem_serial_id
Definition: pios_hal.c:127
uintptr_t pios_com_debug_id
Definition: pios_board.c:76
uintptr_t pios_com_lighttelemetry_id
uintptr_t pios_com_msp_id
uintptr_t pios_com_telem_usb_id
Definition: pios_board.c:42
uintptr_t pios_com_gps_id
Definition: pios_hal.c:80
uintptr_t pios_com_openlog_id
Definition: pios_board.c:77