Merge branch 'fix/engine_enable_pins' into 'develop'
added new gpio controls to board file See merge request !20
This commit is contained in:
		@@ -26,30 +26,113 @@
 | 
			
		||||
#include "stm32f4_gpio.h"
 | 
			
		||||
#include "driver.h"
 | 
			
		||||
 | 
			
		||||
#if 0
 | 
			
		||||
// GPIO_D12
 | 
			
		||||
static const GPIO_InitTypeDef port_cfg_d12 = {
 | 
			
		||||
		.Pin = GPIO_PIN_12,
 | 
			
		||||
// GPIO_C0
 | 
			
		||||
static const GPIO_InitTypeDef port_cfg_c0 = {
 | 
			
		||||
		.Pin = GPIO_PIN_0,
 | 
			
		||||
		.Mode = GPIO_MODE_OUTPUT_PP,
 | 
			
		||||
		.Speed = GPIO_SPEED_FREQ_HIGH,
 | 
			
		||||
		.Pull = GPIO_PULLUP,
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
static const struct stm32f4_gpio stm32_f4_gpio_d12 = {
 | 
			
		||||
		.port = GPIOD,
 | 
			
		||||
		.pin = &port_cfg_d12,
 | 
			
		||||
static const struct stm32f4_gpio stm32_f4_gpio_c0 = {
 | 
			
		||||
		.port = GPIOC,
 | 
			
		||||
		.pin = &port_cfg_c0,
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
static const struct gpio __gpio_d12 = {
 | 
			
		||||
		(void*)&stm32_f4_gpio_d12,
 | 
			
		||||
static const struct gpio __gpio_c0 = {
 | 
			
		||||
		(void*)&stm32_f4_gpio_c0,
 | 
			
		||||
		&gpio_fp
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
static const struct driver gpio_d12 = {
 | 
			
		||||
		DRIVER_TYPE_GPIO,
 | 
			
		||||
		&__gpio_d12,
 | 
			
		||||
};
 | 
			
		||||
#ifdef TEST_APP
 | 
			
		||||
static const struct driver gpio_c0 = {
 | 
			
		||||
#else
 | 
			
		||||
const struct driver gpio_c0 = {
 | 
			
		||||
#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
 | 
			
		||||
static const enum stm32_sys_tick_time_base stm23_sys_tick_time_base =
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user