MindPX: Use i2c rgbled.

This commit is contained in:
Henry Zhang
2016-10-29 10:56:32 +02:00
committed by Lorenz Meier
parent 016aa47dfc
commit b76c8cd80c
3 changed files with 41 additions and 40 deletions
@@ -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,
// }
// };