Merge remote-tracking branch 'origin/development'

# Conflicts:
#	include/etl/version.h
#	support/Release notes.txt
This commit is contained in:
John Wellbelove 2018-08-09 20:51:46 +01:00
parent 0b4543f482
commit bec1e40c55
9 changed files with 45 additions and 27 deletions

View File

@ -336,7 +336,7 @@
<MiscControls></MiscControls>
<Define></Define>
<Undefine></Undefine>
<IncludePath>..\..\src;..\ArmTimerCallbacks - C++</IncludePath>
<IncludePath>..\..\include;..\ArmTimerCallbacks - C++</IncludePath>
</VariousControls>
</Cads>
<Aads>

View File

@ -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

View File

@ -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;

View File

@ -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

View File

@ -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;

View File

@ -40,4 +40,4 @@ SOFTWARE.
#include <iterator>
#endif
#endif
#endif

View File

@ -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

View File

@ -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.

View File

@ -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);