Merge branch 'fix/engine_enable_pins' into 'develop'

added new gpio controls to board file



See merge request !20
This commit is contained in:
tkl 2016-08-18 19:35:37 +00:00
commit 2f141f0a3c

View File

@ -26,30 +26,113 @@
#include "stm32f4_gpio.h" #include "stm32f4_gpio.h"
#include "driver.h" #include "driver.h"
#if 0 // GPIO_C0
// GPIO_D12 static const GPIO_InitTypeDef port_cfg_c0 = {
static const GPIO_InitTypeDef port_cfg_d12 = { .Pin = GPIO_PIN_0,
.Pin = GPIO_PIN_12,
.Mode = GPIO_MODE_OUTPUT_PP, .Mode = GPIO_MODE_OUTPUT_PP,
.Speed = GPIO_SPEED_FREQ_HIGH, .Speed = GPIO_SPEED_FREQ_HIGH,
.Pull = GPIO_PULLUP, .Pull = GPIO_PULLUP,
}; };
static const struct stm32f4_gpio stm32_f4_gpio_d12 = { static const struct stm32f4_gpio stm32_f4_gpio_c0 = {
.port = GPIOD, .port = GPIOC,
.pin = &port_cfg_d12, .pin = &port_cfg_c0,
}; };
static const struct gpio __gpio_d12 = { static const struct gpio __gpio_c0 = {
(void*)&stm32_f4_gpio_d12, (void*)&stm32_f4_gpio_c0,
&gpio_fp &gpio_fp
}; };
static const struct driver gpio_d12 = { #ifdef TEST_APP
DRIVER_TYPE_GPIO, static const struct driver gpio_c0 = {
&__gpio_d12, #else
}; const struct driver gpio_c0 = {
#endif #endif
DRIVER_TYPE_GPIO,
&__gpio_c0,
};
// GPIO_C1
static const GPIO_InitTypeDef port_cfg_c1 = {
.Pin = GPIO_PIN_1,
.Mode = GPIO_MODE_OUTPUT_PP,
.Speed = GPIO_SPEED_FREQ_HIGH,
.Pull = GPIO_PULLUP,
};
static const struct stm32f4_gpio stm32_f4_gpio_c1 = {
.port = GPIOC,
.pin = &port_cfg_c1,
};
static const struct gpio __gpio_c1 = {
(void*)&stm32_f4_gpio_c1,
&gpio_fp
};
#ifdef TEST_APP
static const struct driver gpio_c1 = {
#else
const struct driver gpio_c1 = {
#endif
DRIVER_TYPE_GPIO,
&__gpio_c0,
};
// GPIO_C2
static const GPIO_InitTypeDef port_cfg_c2 = {
.Pin = GPIO_PIN_2,
.Mode = GPIO_MODE_OUTPUT_PP,
.Speed = GPIO_SPEED_FREQ_HIGH,
.Pull = GPIO_PULLUP,
};
static const struct stm32f4_gpio stm32_f4_gpio_c2 = {
.port = GPIOC,
.pin = &port_cfg_c0,
};
static const struct gpio __gpio_c2 = {
(void*)&stm32_f4_gpio_c2,
&gpio_fp
};
#ifdef TEST_APP
static const struct driver gpio_c2 = {
#else
const struct driver gpio_c2 = {
#endif
DRIVER_TYPE_GPIO,
&__gpio_c2,
};
// GPIO_C3
static const GPIO_InitTypeDef port_cfg_c3 = {
.Pin = GPIO_PIN_3,
.Mode = GPIO_MODE_OUTPUT_PP,
.Speed = GPIO_SPEED_FREQ_HIGH,
.Pull = GPIO_PULLUP,
};
static const struct stm32f4_gpio stm32_f4_gpio_c3 = {
.port = GPIOC,
.pin = &port_cfg_c3,
};
static const struct gpio __gpio_c3 = {
(void*)&stm32_f4_gpio_c3,
&gpio_fp
};
#ifdef TEST_APP
static const struct driver gpio_c3 = {
#else
const struct driver gpio_c3 = {
#endif
DRIVER_TYPE_GPIO,
&__gpio_c3,
};
// SYSTEM TICK // SYSTEM TICK
static const enum stm32_sys_tick_time_base stm23_sys_tick_time_base = static const enum stm32_sys_tick_time_base stm23_sys_tick_time_base =