1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-02-20 10:54:14 +01:00

REVONANO - some cleanup

This commit is contained in:
Alessio Morale 2015-04-08 23:56:24 +02:00
parent 60f8a8d9f0
commit 2497b3d605
4 changed files with 2 additions and 96 deletions

View File

@ -160,11 +160,10 @@ void PIOS_SYS_Init(void)
#if (PIOS_USB_ENABLED)
GPIO_InitStructure.GPIO_Pin &= ~(GPIO_Pin_11 | GPIO_Pin_12); // leave USB D+/D- alone
#endif
GPIO_InitStructure.GPIO_Pin &= ~(GPIO_Pin_13 | GPIO_Pin_14 | GPIO_Pin_15); // leave JTAG pins alone
GPIO_InitStructure.GPIO_Pin &= ~(GPIO_Pin_13 | GPIO_Pin_14); // leave JTAG pins alone
GPIO_Init(GPIOA, &GPIO_InitStructure);
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_All;
GPIO_InitStructure.GPIO_Pin &= ~(GPIO_Pin_3 | GPIO_Pin_4); // leave JTAG pins alone
GPIO_Init(GPIOB, &GPIO_InitStructure);
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_All;

View File

@ -970,7 +970,6 @@ static const struct pios_tim_channel pios_tim_servoport_all_pins[] = {
TIM_SERVO_CHANNEL_CONFIG(TIM5, 1, A, 0),
TIM_SERVO_CHANNEL_CONFIG(TIM5, 2, A, 1),
// PWM pins on FlexiIO(receiver) port
TIM_SERVO_CHANNEL_CONFIG(TIM2, 3, B, 10),
TIM_SERVO_CHANNEL_CONFIG(TIM3, 4, B, 1),
TIM_SERVO_CHANNEL_CONFIG(TIM3, 3, B, 0),
@ -1068,17 +1067,6 @@ const struct pios_pwm_cfg pios_pwm_cfg = {
.channels = pios_tim_rcvrport_all_channels,
.num_channels = NELEMENTS(pios_tim_rcvrport_all_channels),
};
// this configures outputs 2-6 as pwm inputs
const struct pios_pwm_cfg pios_pwm_ppm_cfg = {
.tim_ic_init = {
.TIM_ICPolarity = TIM_ICPolarity_Rising,
.TIM_ICSelection = TIM_ICSelection_DirectTI,
.TIM_ICPrescaler = TIM_ICPSC_DIV1,
.TIM_ICFilter = 0x0,
},
.channels = &pios_tim_rcvrport_all_channels[1],
.num_channels = NELEMENTS(pios_tim_rcvrport_all_channels) - 1,
};
#endif /* if defined(PIOS_INCLUDE_PWM) || defined(PIOS_INCLUDE_PPM) */
@ -1209,69 +1197,6 @@ const struct pios_ws2811_pin_cfg pios_ws2811_pin_cfg[] = {
.GPIO_OType = GPIO_OType_PP,
},
},
[HWSETTINGS_WS2811LED_OUT_SERVOOUT2] = {
.gpio = GPIOB,
.gpioInit = {
.GPIO_Pin = GPIO_Pin_1,
.GPIO_Speed = GPIO_Speed_25MHz,
.GPIO_Mode = GPIO_Mode_OUT,
.GPIO_OType = GPIO_OType_PP,
},
},
[HWSETTINGS_WS2811LED_OUT_SERVOOUT3] = {
.gpio = GPIOA,
.gpioInit = {
.GPIO_Pin = GPIO_Pin_3,
.GPIO_Speed = GPIO_Speed_25MHz,
.GPIO_Mode = GPIO_Mode_OUT,
.GPIO_OType = GPIO_OType_PP,
},
},
[HWSETTINGS_WS2811LED_OUT_SERVOOUT4] = {
.gpio = GPIOA,
.gpioInit = {
.GPIO_Pin = GPIO_Pin_2,
.GPIO_Speed = GPIO_Speed_25MHz,
.GPIO_Mode = GPIO_Mode_OUT,
.GPIO_OType = GPIO_OType_PP,
},
},
[HWSETTINGS_WS2811LED_OUT_SERVOOUT5] = {
.gpio = GPIOA,
.gpioInit = {
.GPIO_Pin = GPIO_Pin_1,
.GPIO_Speed = GPIO_Speed_25MHz,
.GPIO_Mode = GPIO_Mode_OUT,
.GPIO_OType = GPIO_OType_PP,
},
},
[HWSETTINGS_WS2811LED_OUT_SERVOOUT6] = {
.gpio = GPIOA,
.gpioInit = {
.GPIO_Pin = GPIO_Pin_0,
.GPIO_Speed = GPIO_Speed_25MHz,
.GPIO_Mode = GPIO_Mode_OUT,
.GPIO_OType = GPIO_OType_PP,
},
},
[HWSETTINGS_WS2811LED_OUT_FLEXIPIN3] = {
.gpio = GPIOB,
.gpioInit = {
.GPIO_Pin = GPIO_Pin_12,
.GPIO_Speed = GPIO_Speed_25MHz,
.GPIO_Mode = GPIO_Mode_OUT,
.GPIO_OType = GPIO_OType_PP,
},
},
[HWSETTINGS_WS2811LED_OUT_FLEXIPIN4] = {
.gpio = GPIOB,
.gpioInit = {
.GPIO_Pin = GPIO_Pin_13,
.GPIO_Speed = GPIO_Speed_25MHz,
.GPIO_Mode = GPIO_Mode_OUT,
.GPIO_OType = GPIO_OType_PP,
},
},
};
const struct pios_ws2811_cfg pios_ws2811_cfg = {

View File

@ -69,7 +69,7 @@
#define PIOS_INCLUDE_SPI
#define PIOS_INCLUDE_GPIO
#define PIOS_INCLUDE_EXTI
//#define PIOS_INCLUDE_WDG
// #define PIOS_INCLUDE_WDG
/* PIOS USB functions */
#define PIOS_INCLUDE_USB

View File

@ -677,11 +677,6 @@ void PIOS_Board_Init(void)
PIOS_Board_configure_ppm(&pios_ppm_cfg);
// enable pwm on the remaining channels
if (hwsettings_rcvrport == HWSETTINGS_RM_RCVRPORT_PPMPWM) {
PIOS_Board_configure_pwm(&pios_pwm_ppm_cfg);
}
break;
#endif /* PIOS_INCLUDE_PPM */
case HWSETTINGS_RM_RCVRPORT_OUTPUTS:
@ -702,19 +697,6 @@ void PIOS_Board_Init(void)
pios_rcvr_group_map[MANUALCONTROLSETTINGS_CHANNELGROUPS_GCS] = pios_gcsrcvr_rcvr_id;
#endif /* PIOS_INCLUDE_GCSRCVR */
#if defined(PIOS_INCLUDE_OPLINKRCVR)
{
OPLinkReceiverInitialize();
uint32_t pios_oplinkrcvr_id;
PIOS_OPLinkRCVR_Init(&pios_oplinkrcvr_id);
uint32_t pios_oplinkrcvr_rcvr_id;
if (PIOS_RCVR_Init(&pios_oplinkrcvr_rcvr_id, &pios_oplinkrcvr_rcvr_driver, pios_oplinkrcvr_id)) {
PIOS_Assert(0);
}
pios_rcvr_group_map[MANUALCONTROLSETTINGS_CHANNELGROUPS_OPLINK] = pios_oplinkrcvr_rcvr_id;
}
#endif /* PIOS_INCLUDE_OPLINKRCVR */
#ifndef PIOS_ENABLE_DEBUG_PINS
// pios_servo_cfg points to the correct configuration based on input port settings
PIOS_Servo_Init(pios_servo_cfg);