mirror of
https://github.com/ETLCPP/etl.git
synced 2026-06-28 05:18:43 +08:00
Merge remote-tracking branch 'origin/development'
# Conflicts: # include/etl/version.h # support/Release notes.txt
This commit is contained in:
parent
0b4543f482
commit
bec1e40c55
@ -336,7 +336,7 @@
|
||||
<MiscControls></MiscControls>
|
||||
<Define></Define>
|
||||
<Undefine></Undefine>
|
||||
<IncludePath>..\..\src;..\ArmTimerCallbacks - C++</IncludePath>
|
||||
<IncludePath>..\..\include;..\ArmTimerCallbacks - C++</IncludePath>
|
||||
</VariousControls>
|
||||
</Cads>
|
||||
<Aads>
|
||||
|
||||
@ -9,13 +9,14 @@
|
||||
#define ETL_IVECTOR_REPAIR_ENABLE
|
||||
#define ETL_IDEQUE_REPAIR_ENABLE
|
||||
#define ETL_IN_UNIT_TEST
|
||||
#define ETL_CALLBACK_TIMER_USE_ATOMIC_LOCK
|
||||
|
||||
#if (__CC_ARM == 1)
|
||||
// ARM5 compiler
|
||||
#include "profiles/armv5.h"
|
||||
#include "etl/profiles/armv5.h"
|
||||
#else
|
||||
// ARM6 compiler
|
||||
#include "profiles/armv6.h"
|
||||
#include "etl/profiles/armv6.h"
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@ -9,8 +9,23 @@ extern "C"
|
||||
#include "stm32f4xx.h" // Device header
|
||||
}
|
||||
|
||||
#include "function.h"
|
||||
#include "callback_timer.h"
|
||||
#include "etl/function.h"
|
||||
#include "etl/callback_timer.h"
|
||||
#include "etl/vector.h"
|
||||
|
||||
struct FP
|
||||
{
|
||||
void (*function)();
|
||||
};
|
||||
|
||||
static etl::vector<FP, 10> power_callbacks;
|
||||
|
||||
void register_poweroff_callback(void (*function)())
|
||||
{
|
||||
FP fp = { function };
|
||||
power_callbacks.push_back(fp);
|
||||
}
|
||||
|
||||
|
||||
const int N_TIMERS = 4;
|
||||
|
||||
|
||||
@ -34,7 +34,7 @@ SOFTWARE.
|
||||
#include "../static_assert.h"
|
||||
#include "../nullptr.h"
|
||||
|
||||
#include <stdatomic.h>
|
||||
//#include <stdatomic.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
|
||||
@ -84,25 +84,15 @@ namespace etl
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline debug_count& operator +=(int32_t n)
|
||||
{
|
||||
count += n;
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline debug_count& operator -=(int32_t n)
|
||||
{
|
||||
count -= n;
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline debug_count& operator +=(size_t n)
|
||||
template <typename T>
|
||||
inline debug_count& operator +=(T n)
|
||||
{
|
||||
count += int32_t(n);
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline debug_count& operator -=(size_t n)
|
||||
template <typename T>
|
||||
inline debug_count& operator -=(T n)
|
||||
{
|
||||
count -= int32_t(n);
|
||||
return *this;
|
||||
|
||||
@ -40,4 +40,4 @@ SOFTWARE.
|
||||
#include <iterator>
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@ -37,10 +37,10 @@ SOFTWARE.
|
||||
/// Definitions of the ETL version
|
||||
///\ingroup utilities
|
||||
|
||||
#define ETL_VERSION "11.15.0"
|
||||
#define ETL_VERSION_W L"11.15.0"
|
||||
#define ETL_VERSION_U16 u"11.15.0"
|
||||
#define ETL_VERSION_U32 U"11.15.0"
|
||||
#define ETL_VERSION "11.15.1"
|
||||
#define ETL_VERSION_W L"11.15.1"
|
||||
#define ETL_VERSION_U16 u"11.15.1"
|
||||
#define ETL_VERSION_U32 U"11.15.1"
|
||||
#define ETL_VERSION_MAJOR 11
|
||||
#define ETL_VERSION_MINOR 15
|
||||
#define ETL_VERSION_PATCH 0
|
||||
|
||||
@ -1,3 +1,8 @@
|
||||
===============================================================================
|
||||
11.15.1
|
||||
io_port_test Fixed unaligned access error.
|
||||
debug_count Removed typed += & -= operators and replaced with templates.
|
||||
|
||||
===============================================================================
|
||||
11.15.0
|
||||
Added 'memory model' selection for queues to allow more efficient implementations.
|
||||
|
||||
@ -95,7 +95,14 @@ namespace
|
||||
//*************************************************************************
|
||||
TEST(test_dynamic_io_port)
|
||||
{
|
||||
uint8_t memory[7];
|
||||
union U
|
||||
{
|
||||
uint16_t dummy;
|
||||
uint8_t memory[7];
|
||||
} u;
|
||||
|
||||
uint8_t* memory = &u.memory[0];
|
||||
|
||||
memory[0] = 0x12;
|
||||
memory[1] = 0x00;
|
||||
memory[2] = 0x00;
|
||||
@ -104,7 +111,7 @@ namespace
|
||||
memory[5] = 0x9A;
|
||||
memory[6] = 0x00;
|
||||
|
||||
dynamic_serial_port port(memory);
|
||||
dynamic_serial_port port(&u.memory[0]);
|
||||
|
||||
uint8_t rxdata = port.rxdata;
|
||||
CHECK_EQUAL(memory[0], rxdata);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user