diff --git a/flight/pios/stm32f4xx/pios_sys.c b/flight/pios/stm32f4xx/pios_sys.c index aa9d98b54..1572697aa 100644 --- a/flight/pios/stm32f4xx/pios_sys.c +++ b/flight/pios/stm32f4xx/pios_sys.c @@ -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; diff --git a/flight/targets/boards/revonano/board_hw_defs.c b/flight/targets/boards/revonano/board_hw_defs.c index d900174c3..34b3cbd3f 100644 --- a/flight/targets/boards/revonano/board_hw_defs.c +++ b/flight/targets/boards/revonano/board_hw_defs.c @@ -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 = { diff --git a/flight/targets/boards/revonano/firmware/inc/pios_config.h b/flight/targets/boards/revonano/firmware/inc/pios_config.h index 5f27cbf04..edce03ec9 100644 --- a/flight/targets/boards/revonano/firmware/inc/pios_config.h +++ b/flight/targets/boards/revonano/firmware/inc/pios_config.h @@ -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 diff --git a/flight/targets/boards/revonano/firmware/pios_board.c b/flight/targets/boards/revonano/firmware/pios_board.c index 5a8d0381b..8156d2a15 100644 --- a/flight/targets/boards/revonano/firmware/pios_board.c +++ b/flight/targets/boards/revonano/firmware/pios_board.c @@ -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);