dRonin  adbada4
dRonin firmware
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
pios_can_priv.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 #if !defined(PIOS_CAN_PRIV_H)
31 #define PIOS_CAN_PRIV_H
32 
33 extern const struct pios_com_driver pios_can_com_driver;
34 
35 struct pios_can_cfg {
36  CAN_TypeDef *regs;
37  CAN_InitTypeDef init;
38  uint32_t remap;
39  struct stm32_gpio rx;
40  struct stm32_gpio tx;
41  struct stm32_irq rx_irq;
42  struct stm32_irq tx_irq;
43 };
44 
51 int32_t PIOS_CAN_Init(uintptr_t *id, const struct pios_can_cfg *cfg);
52 
53 #endif /* PIOS_CAN_PRIV_H */
54 
CAN_InitTypeDef init
CAN device to configure.
Definition: pios_can_priv.h:37
CAN_TypeDef * regs
Definition: pios_can_priv.h:36
struct stm32_irq tx_irq
Configuration for IRQ.
Definition: pios_can_priv.h:42
struct stm32_gpio tx
Configuration for RX pin.
Definition: pios_can_priv.h:40
uint32_t remap
Init config for CAN device.
Definition: pios_can_priv.h:38
struct stm32_gpio rx
GPIO remapping to alternative function.
Definition: pios_can_priv.h:39
static struct flyingpicmd_cfg_fa cfg
Definition: main.c:49
int32_t PIOS_CAN_Init(uintptr_t *id, const struct pios_can_cfg *cfg)
const struct pios_com_driver pios_can_com_driver
struct stm32_irq rx_irq
Configuration for TX pin.
Definition: pios_can_priv.h:41