1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-24 00:35:39 +03:00

Method for adding defaults using defines for resources. (#12342)

* Method for adding defaults using defines for resources.

* As we will always be using the fullTimerHardware, we just need to configure the pin mapping.

This is done in the config.h as

#define TIMER_PIN_MAPPING   \
    TIMER_PIN_MAP(0, PA0, 1, 0) \
    TIMER_PIN_MAP(0, PA1, 1, 0)

timerHardware[] dependencies to be removed in another PR

* Adding missing pin definitions (removing dependency on timerHardware)

* Typo

* In case MOTOR1_PIN is not defined, but a motor is configured
This commit is contained in:
J Blackman 2023-02-12 14:06:49 +11:00 committed by GitHub
parent bb875cd0d6
commit 19f22f5120
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 72 additions and 39 deletions

View file

@ -133,7 +133,11 @@ void pgResetFn_ledStripConfig(ledStripConfig_t *ledStripConfig)
ledStripConfig->ledstrip_visual_beeper_color = VISUAL_BEEPER_COLOR;
ledStripConfig->ledstrip_brightness = 100;
#ifndef UNIT_TEST
ledStripConfig->ioTag = timerioTagGetByUsage(TIM_USE_LED, 0);
#ifdef LED_STRIP_PIN
ledStripConfig->ioTag = IO_TAG(LED_STRIP_PIN);
#else
ledStripConfig->ioTag = IO_TAG_NONE;
#endif
#endif
}