mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
MindPX: Use i2c rgbled.
This commit is contained in:
parent
016aa47dfc
commit
b76c8cd80c
@ -15,8 +15,8 @@ set(config_module_list
|
||||
drivers/led
|
||||
drivers/px4fmu
|
||||
drivers/boards/mindpx-v2
|
||||
#drivers/rgbled
|
||||
drivers/rgbled_pwm
|
||||
drivers/rgbled
|
||||
#drivers/rgbled_pwm
|
||||
#drivers/mpu6000
|
||||
#drivers/mpu6050
|
||||
drivers/mpu6500
|
||||
|
||||
@ -154,16 +154,17 @@
|
||||
//#define PX4_SPIDEV_EXT_GYRO PX4_SPIDEV_EXT3
|
||||
|
||||
/* I2C busses */
|
||||
#define PX4_I2C_BUS_EXPANSION 2
|
||||
#define PX4_I2C_BUS_ONBOARD 1
|
||||
#define PX4_I2C_BUS_EXPANSION 2
|
||||
#define PX4_I2C_BUS_LED PX4_I2C_BUS_EXPANSION
|
||||
|
||||
/* Devices on the onboard bus.
|
||||
*
|
||||
* Note that these are unshifted addresses.
|
||||
*/
|
||||
//#define PX4_I2C_OBDEV_LED 0x55
|
||||
#define PX4_I2C_OBDEV_HMC5883 0x1e
|
||||
//#define PX4_I2C_OBDEV_MPU6050 0x68
|
||||
#define PX4_I2C_OBDEV_LED 0x55
|
||||
// #define PX4_I2C_OBDEV_MPU6050 0x68
|
||||
|
||||
/*
|
||||
* ADC channels
|
||||
@ -213,11 +214,11 @@
|
||||
#define GPIO_GPIO12_OUTPUT (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTE|GPIO_PIN15)
|
||||
#define GPIO_GPIO13_OUTPUT (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTC|GPIO_PIN6)
|
||||
|
||||
#define BOARD_HAS_LED_PWM
|
||||
#define BOARD_LED_PWM_DRIVE_ACTIVE_LOW
|
||||
#define LED_TIM3_CH3OUT (GPIO_ALT|GPIO_AF2|GPIO_SPEED_50MHz|GPIO_OPENDRAIN|GPIO_PORTB|GPIO_PIN0)
|
||||
#define LED_TIM3_CH2OUT (GPIO_ALT|GPIO_AF2|GPIO_SPEED_50MHz|GPIO_OPENDRAIN|GPIO_PORTC|GPIO_PIN7)
|
||||
#define LED_TIM3_CH4OUT (GPIO_ALT|GPIO_AF2|GPIO_SPEED_50MHz|GPIO_OPENDRAIN|GPIO_PORTB|GPIO_PIN1)
|
||||
// #define BOARD_HAS_LED_PWM
|
||||
// #define BOARD_LED_PWM_DRIVE_ACTIVE_LOW
|
||||
// #define LED_TIM3_CH3OUT (GPIO_ALT|GPIO_AF2|GPIO_SPEED_50MHz|GPIO_OPENDRAIN|GPIO_PORTB|GPIO_PIN0)
|
||||
// #define LED_TIM3_CH2OUT (GPIO_ALT|GPIO_AF2|GPIO_SPEED_50MHz|GPIO_OPENDRAIN|GPIO_PORTC|GPIO_PIN7)
|
||||
// #define LED_TIM3_CH4OUT (GPIO_ALT|GPIO_AF2|GPIO_SPEED_50MHz|GPIO_OPENDRAIN|GPIO_PORTB|GPIO_PIN1)
|
||||
|
||||
/* Power supply control and monitoring GPIOs */
|
||||
//#define GPIO_VDD_5V_PERIPH_EN (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTA|GPIO_PIN8)
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* Copyright (c) 2015, 2016 Airmind Development Team. All rights reserved.
|
||||
* Copyright (c) 2015, 2016 PX4 Development Team. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
@ -12,7 +12,7 @@
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name Airmind nor the names of its contributors may be
|
||||
* 3. Neither the name PX4 nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
@ -130,32 +130,32 @@ __EXPORT const timer_io_channels_t timer_io_channels[MAX_TIMER_IO_CHANNELS] = {
|
||||
// }
|
||||
};
|
||||
|
||||
__EXPORT const struct io_timers_t led_pwm_timers[1] = {
|
||||
{
|
||||
.base = STM32_TIM3_BASE,
|
||||
.clock_register = STM32_RCC_APB1ENR,
|
||||
.clock_bit = RCC_APB1ENR_TIM3EN,
|
||||
.clock_freq = STM32_APB1_TIM3_CLKIN,
|
||||
}
|
||||
};
|
||||
// __EXPORT const struct io_timers_t led_pwm_timers[1] = {
|
||||
// {
|
||||
// .base = STM32_TIM3_BASE,
|
||||
// .clock_register = STM32_RCC_APB1ENR,
|
||||
// .clock_bit = RCC_APB1ENR_TIM3EN,
|
||||
// .clock_freq = STM32_APB1_TIM3_CLKIN,
|
||||
// }
|
||||
// };
|
||||
|
||||
__EXPORT const struct timer_io_channels_t led_pwm_channels[3] = {
|
||||
{
|
||||
.gpio_out = LED_TIM3_CH3OUT,
|
||||
.gpio_in = 0,
|
||||
.timer_index = 0,
|
||||
.timer_channel = 3,
|
||||
},
|
||||
{
|
||||
.gpio_out = LED_TIM3_CH2OUT,
|
||||
.gpio_in = 0,
|
||||
.timer_index = 0,
|
||||
.timer_channel = 2,
|
||||
},
|
||||
{
|
||||
.gpio_out = LED_TIM3_CH4OUT,
|
||||
.gpio_in = 0,
|
||||
.timer_index = 0,
|
||||
.timer_channel = 4,
|
||||
}
|
||||
};
|
||||
// __EXPORT const struct timer_io_channels_t led_pwm_channels[3] = {
|
||||
// {
|
||||
// .gpio_out = LED_TIM3_CH3OUT,
|
||||
// .gpio_in = 0,
|
||||
// .timer_index = 0,
|
||||
// .timer_channel = 3,
|
||||
// },
|
||||
// {
|
||||
// .gpio_out = LED_TIM3_CH2OUT,
|
||||
// .gpio_in = 0,
|
||||
// .timer_index = 0,
|
||||
// .timer_channel = 2,
|
||||
// },
|
||||
// {
|
||||
// .gpio_out = LED_TIM3_CH4OUT,
|
||||
// .gpio_in = 0,
|
||||
// .timer_index = 0,
|
||||
// .timer_channel = 4,
|
||||
// }
|
||||
// };
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user