1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-18 03:52:11 +01:00

debugpins: Add definitions for debug pins

Not yet used anywhere but will eventually allow
debug pins to be assigned during runtime init based
on configuration found in a new uavobject.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2741 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
stac 2011-02-06 01:03:06 +00:00 committed by stac
parent 9f595842dd
commit 4e6b539086
2 changed files with 102 additions and 0 deletions

View File

@ -391,3 +391,26 @@ void PIOS_I2C_main_adapter_er_irq_handler(void)
} }
#endif /* PIOS_INCLUDE_I2C */ #endif /* PIOS_INCLUDE_I2C */
#if defined(PIOS_ENABLE_DEBUG_PINS)
static const struct stm32_gpio pios_debug_pins[] = {
{
.gpio = GPIOB,
.init = {
.GPIO_Pin = GPIO_Pin_11,
.GPIO_Speed = GPIO_Speed_50MHz,
.GPIO_Mode = GPIO_Mode_IN_FLOATING,
},
},
{
.gpio = GPIOB,
.init = {
.GPIO_Pin = GPIO_Pin_10,
.GPIO_Speed = GPIO_Speed_50MHz,
.GPIO_Mode = GPIO_Mode_Out_PP,
},
},
};
#endif /* PIOS_ENABLE_DEBUG_PINS */

View File

@ -961,6 +961,85 @@ void PIOS_I2C_main_adapter_er_irq_handler(void)
PIOS_I2C_ER_IRQ_Handler(PIOS_I2C_MAIN_ADAPTER); PIOS_I2C_ER_IRQ_Handler(PIOS_I2C_MAIN_ADAPTER);
} }
#if defined(PIOS_ENABLE_DEBUG_PINS)
static const struct stm32_gpio pios_debug_pins[] = {
#define PIOS_DEBUG_PIN_SERVO_1 0
{
.gpio = GPIOB,
.init = {
.GPIO_Pin = GPIO_Pin_6,
.GPIO_Speed = GPIO_Speed_50MHz,
.GPIO_Mode = GPIO_Mode_Out_PP;
},
},
#define PIOS_DEBUG_PIN_SERVO_2 1
{
.gpio = GPIOB,
.init = {
.GPIO_Pin = GPIO_Pin_7,
.GPIO_Speed = GPIO_Speed_50MHz,
.GPIO_Mode = GPIO_Mode_Out_PP;
},
},
#define PIOS_DEBUG_PIN_SERVO_3 2
{
.gpio = GPIOB,
.init = {
.GPIO_Pin = GPIO_Pin_8,
.GPIO_Speed = GPIO_Speed_50MHz,
.GPIO_Mode = GPIO_Mode_Out_PP;
},
},
#define PIOS_DEBUG_PIN_SERVO_4 3
{
.gpio = GPIOB,
.init = {
.GPIO_Pin = GPIO_Pin_9,
.GPIO_Speed = GPIO_Speed_50MHz,
.GPIO_Mode = GPIO_Mode_Out_PP;
},
},
#define PIOS_DEBUG_PIN_SERVO_5 4
{
.gpio = GPIOC,
.init = {
.GPIO_Pin = GPIO_Pin_6,
.GPIO_Speed = GPIO_Speed_50MHz,
.GPIO_Mode = GPIO_Mode_Out_PP;
},
},
#define PIOS_DEBUG_PIN_SERVO_6 5
{
.gpio = GPIOC,
.init = {
.GPIO_Pin = GPIO_Pin_7,
.GPIO_Speed = GPIO_Speed_50MHz,
.GPIO_Mode = GPIO_Mode_Out_PP;
},
},
#define PIOS_DEBUG_PIN_SERVO_7 6
{
.gpio = GPIOC,
.init = {
.GPIO_Pin = GPIO_Pin_8,
.GPIO_Speed = GPIO_Speed_50MHz,
.GPIO_Mode = GPIO_Mode_Out_PP;
},
},
#define PIOS_DEBUG_PIN_SERVO_8 7
{
.gpio = GPIOC,
.init = {
.GPIO_Pin = GPIO_Pin_9,
.GPIO_Speed = GPIO_Speed_50MHz,
.GPIO_Mode = GPIO_Mode_Out_PP;
},
},
};
#endif /* PIOS_ENABLE_DEBUG_PINS */
/** /**
* @} * @}
*/ */