dRonin  adbada4
dRonin firmware
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
serial_4way_impl.h
Go to the documentation of this file.
1 /*
2  * This file is part of Cleanflight.
3  *
4  * Cleanflight is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * Cleanflight is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with Cleanflight. If not, see <http://www.gnu.org/licenses/>.
16  * Author: 4712
17 */
18 #pragma once
19 
20 #ifndef DRONIN_TARGET
21 #include "drivers/io_types.h"
22 #endif
23 
24 typedef struct {
25  IO_t io;
27 
28 extern uint8_t selected_esc;
29 
30 bool isEscHi(uint8_t selEsc);
31 bool isEscLo(uint8_t selEsc);
32 void setEscHi(uint8_t selEsc);
33 void setEscLo(uint8_t selEsc);
34 void setEscInput(uint8_t selEsc);
35 void setEscOutput(uint8_t selEsc);
36 
37 #define ESC_IS_HI isEscHi(selected_esc)
38 #define ESC_IS_LO isEscLo(selected_esc)
39 #define ESC_SET_HI setEscHi(selected_esc)
40 #define ESC_SET_LO setEscLo(selected_esc)
41 #define ESC_INPUT setEscInput(selected_esc)
42 #define ESC_OUTPUT setEscOutput(selected_esc)
43 
44 typedef struct ioMem_s {
45  uint8_t D_NUM_BYTES;
46  uint8_t D_FLASH_ADDR_H;
47  uint8_t D_FLASH_ADDR_L;
48  uint8_t *D_PTR_I;
49 } ioMem_t;
50 
struct ioMem_s ioMem_t
void setEscInput(uint8_t selEsc)
void setEscHi(uint8_t selEsc)
bool isEscLo(uint8_t selEsc)
uint8_t D_NUM_BYTES
uint8_t D_FLASH_ADDR_L
bool isEscHi(uint8_t selEsc)
uint8_t D_FLASH_ADDR_H
void setEscLo(uint8_t selEsc)
uint8_t selected_esc
uint8_t * D_PTR_I
void setEscOutput(uint8_t selEsc)