mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-20 23:05:19 +03:00
STM32F4: Drivers
This commit is contained in:
parent
96757c18a2
commit
7ca39bbde6
29 changed files with 2082 additions and 282 deletions
|
@ -5,26 +5,33 @@
|
|||
#include "platform.h"
|
||||
|
||||
typedef struct ioDef_s {
|
||||
ioTag_t tag;
|
||||
ioTag_t tag;
|
||||
} ioDef_t;
|
||||
|
||||
typedef struct ioRec_s {
|
||||
GPIO_TypeDef *gpio;
|
||||
uint16_t pin;
|
||||
resourceOwner_t owner;
|
||||
resourceType_t resourcesUsed; // TODO!
|
||||
GPIO_TypeDef *gpio;
|
||||
uint16_t pin;
|
||||
resourceOwner_t owner;
|
||||
resourceType_t resourcesUsed; // TODO!
|
||||
} ioRec_t;
|
||||
|
||||
extern ioRec_t ioRecs[DEFIO_IO_USED_COUNT];
|
||||
|
||||
int IO_GPIOPortIdx(IO_t io);
|
||||
int IO_GPIOPinIdx(IO_t io);
|
||||
#if defined(STM32F10X)
|
||||
#if defined(STM32F1)
|
||||
int IO_GPIO_PinSource(IO_t io);
|
||||
int IO_GPIO_PortSource(IO_t io);
|
||||
#elif defined(STM32F3)
|
||||
int IO_GPIO_PinSource(IO_t io);
|
||||
int IO_GPIO_PortSource(IO_t io);
|
||||
#elif defined(STM32F303xC)
|
||||
int IO_EXTI_PortSourceGPIO(IO_t io);
|
||||
int IO_EXTI_PinSource(IO_t io);
|
||||
#endif
|
||||
#elif defined(STM32F4)
|
||||
int IO_GPIO_PinSource(IO_t io);
|
||||
int IO_GPIO_PortSource(IO_t io);
|
||||
int IO_EXTI_PortSourceGPIO(IO_t io);
|
||||
int IO_EXTI_PinSource(IO_t io);
|
||||
# endif
|
||||
uint32_t IO_EXTI_Line(IO_t io);
|
||||
ioRec_t *IO_Rec(IO_t io);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue