mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-23 08:15:30 +03:00
Added DMA mapping (readonly for now), and enabled timer management for all F4 boards.
Converting the universal target as well. Simplified timer management some. Added F722 support for good measuer. Fixed SITL, tests. Cleanup after rebase. Added support for all timer consumers and F7. Fixed 'USE_DMA_SPEC' for F3, some cleanups.
This commit is contained in:
parent
9f8ad1aa44
commit
f8103b8c86
37 changed files with 904 additions and 484 deletions
|
@ -18,7 +18,6 @@
|
|||
extern "C" {
|
||||
#include <target.h>
|
||||
#include <drivers/timer.h>
|
||||
extern const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT];
|
||||
}
|
||||
|
||||
#include <bitset>
|
||||
|
@ -28,6 +27,11 @@ extern "C" {
|
|||
#include <string>
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
#if !defined(USE_UNIFIED_TARGET)
|
||||
extern "C" {
|
||||
extern const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT];
|
||||
}
|
||||
|
||||
TEST(TimerDefinitionTest, Test_counterMismatch) {
|
||||
for (const timerHardware_t &t : timerHardware)
|
||||
ASSERT_EQ(&t - timerHardware, t.def_tim_counter)
|
||||
|
@ -39,7 +43,6 @@ TEST(TimerDefinitionTest, Test_counterMismatch) {
|
|||
<< " array element appears to be " << &t - timerHardware - 1 << '.';
|
||||
}
|
||||
|
||||
#if !defined(USE_TIMER_MGMT)
|
||||
TEST(TimerDefinitionTest, Test_duplicatePin) {
|
||||
std::set<TestPinEnum> usedPins;
|
||||
for (const timerHardware_t &t : timerHardware)
|
||||
|
@ -51,6 +54,7 @@ TEST(TimerDefinitionTest, Test_duplicatePin) {
|
|||
EXPECT_EQ(USABLE_TIMER_CHANNEL_COUNT, usedPins.size());
|
||||
}
|
||||
|
||||
#if !defined(USE_TIMER_MGMT)
|
||||
namespace {
|
||||
std::string writeUsedTimers(const std::bitset<TEST_TIMER_SIZE> &tset) {
|
||||
std::stringstream used_timers;
|
||||
|
@ -103,3 +107,4 @@ extern "C" {
|
|||
|
||||
void bstInit(int) {}
|
||||
}
|
||||
#endif // USE_UNIFIED_TARGET
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue