Skip to content

Release candidate for mbed-os-5.5.2 #4689

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 116 commits into from
Jul 4, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
116 commits
Select commit Hold shift + click to select a range
6f149fa
Turn off "browse information" in Uvision template
sarahmarshy Jun 16, 2017
cc84e14
Fix unresolved include of mbed_config.h in Eclipse
amq Jun 22, 2017
bedbdad
STM32 SPI specific mode for higher performance
LMESTM May 15, 2017
d6f7903
STM32 Add USB pins name in PinNames.h files
jeromecoutant May 24, 2017
e74dcac
DISCO_F413ZH: Creation folders and files (pinout, startup, etc...)
arostm May 5, 2017
720e20b
DISCO_F413ZH: Modification needed to build
arostm May 9, 2017
3a8612f
DISCO_F413ZH: add terget.json, build_travis.py and test.py changes
arostm May 10, 2017
7e0955c
DISCO_F413ZH: add some files and modification (targets.json, rtx...)
arostm May 10, 2017
c7f78b2
DISCO_F413ZH: modifications in peripheralPins.c
arostm May 10, 2017
cc1386a
DISCO_F413ZH: corrections
arostm May 12, 2017
59d6a6c
DISCO_F413ZH: Add BUTTON1 definition
bcostm May 12, 2017
5ec1268
DISCO_F413ZH: Add this board in mbedOS2 CAN tests
bcostm May 11, 2017
3a9c366
DISCO_F413ZH: correct ram length in GCC ld file
bcostm May 12, 2017
906d8dc
DISCO_F413ZH: Fix wrong NVIC RAM end address in IAR icf file
bcostm May 15, 2017
c7e6a88
DISCO_F413ZH: typo corrections in peripheralpins.c
bcostm May 15, 2017
d7f005d
DISCO_F413ZH: Change I2C and SPI instances for Arduino default pins
bcostm May 18, 2017
c63e844
DISCO_F413ZH: add UART9 and 10 in serial_api.c
arostm May 23, 2017
5d04388
DISCO_F413ZH: add IAR exporter
arostm May 24, 2017
97b99d8
DISCO_F413ZH: Remove hal_conf file The board have to use th hal_conf …
arostm Jun 1, 2017
e4e3d0f
DISCO_F413ZH: delete RTOS in build_travis.py
arostm Jun 6, 2017
07d6dcb
DISCO_F413ZH: Deleted cmsis_nvic.c and modified cmsis_nvic.h
arostm Jun 7, 2017
a7b41df
DISCO_F413ZH: Typo correction in build_travis.py
arostm Jun 13, 2017
90a68fb
DISCO_F413ZH: Remove usb from build_travis.py
arostm Jun 15, 2017
077eac3
DISCO_F413ZH: Add include of LL timer file
arostm Jun 15, 2017
ee44eba
Update link in CONTRIBUTING.md
Jun 9, 2017
95c681c
Add extra_targets.json support to build tools
andrewleech Apr 3, 2017
9c575cd
Recursively merge extra_targets into targets
andrewleech Apr 4, 2017
f22dd38
Find extra targets in all source folders
theotherjimmy Apr 6, 2017
4606027
Add custom_targets.json file contents to targets
pi-anl Apr 7, 2017
e940d20
Handle situation when options.source_dir is None
pi-anl Apr 7, 2017
1e2b7be
Clear custom-targets uppon setting new taregts.json location
theotherjimmy Apr 7, 2017
5f529a6
Add basic unit tests for custom_targets.json handling
andrewleech May 8, 2017
49f4608
Prevent modifying existing targets.
andrewleech Jun 10, 2017
daa84f0
Update system_stm32f0xx.c
mickeyln May 25, 2017
daba7c5
Update system_stm32f0xx.c
mickeyln Jun 1, 2017
4eefbdb
Fix_Issue_4404: add correction in PinNames.h
arostm May 30, 2017
8d78e71
Improve speed of .mbedignore processing
theotherjimmy Jun 1, 2017
62d6d95
Delay feature scan until it's rquired
theotherjimmy Jun 16, 2017
abbf61a
Delay relative_to and win_to_unix operations over features
theotherjimmy Jun 16, 2017
11d0cd0
Correct len and iter operators for LazyDict
theotherjimmy Jun 16, 2017
59839e0
Fill out remainder of LazyDict dict compatibility
theotherjimmy Jun 16, 2017
2e1fd1d
Avoid lock collision b/w SerialBase & UARTSerial
Jun 13, 2017
a7c23f1
NUCLEO_F767ZI: Add missing IAR definitions
bcostm Jun 14, 2017
20b8f80
Implement pin_function and gpio_set
mmorenobarm Jun 14, 2017
98d1c49
Add I2C driver for CM3DS MPS2 target
mmorenobarm Jun 14, 2017
0e323d1
Add analogin driver for CM3DS MPS2 target
mmorenobarm Jun 14, 2017
060fec4
Update CMSDK_CM3DS.h
mmorenobarm Jun 15, 2017
15c9eff
Update port api driver to add missing ports
mmorenobarm Jun 15, 2017
196b975
DISCO_L072CZ_LRWAN1: Add USB device configuration files
bcostm Jun 8, 2017
6f2acf9
DISCO_L072CZ_LRWAN1: Update HSI clock config for USB
bcostm Jun 8, 2017
2327be6
DISCO_L072CZ_LRWAN1: Add usb in build_travis.py
bcostm Jun 15, 2017
74361df
DISCO_L072CZ_LRWAN1: Remove unused code
bcostm Jun 19, 2017
fbab24d
NUCLEO_F429ZI/mbedtls: add SHA1 hw_acceleration
adustm Mar 9, 2017
bc3bf9f
use mbedtls_zeroize instead of memset(xxx,0,xxx)
adustm Mar 20, 2017
5799688
Better explanation of the use of mbedtls_sha1_context fields
adustm Mar 20, 2017
726c313
Remove unneeded function declarations + include file Move include pla…
adustm Apr 4, 2017
284b230
Improve memory management
adustm Apr 7, 2017
3d3affa
Move MBEDTLS_SHA1_C from mbedtls_device.h to targets.json
adustm May 15, 2017
f4287fd
Handle 64 bytes buffers
adustm May 16, 2017
95beb43
Rework SHA1 update for buffer <4 bytes management
adustm May 18, 2017
1bea47d
Remove tabs, fix doxygen comments
adustm May 22, 2017
73fe345
Remove MBEDTLS_SHA1_C
adustm May 22, 2017
9a8f5a7
replace 64 by define
adustm May 23, 2017
7e864de
handle context swap + change macro name
adustm Jun 2, 2017
451eb33
Check that the HASH is not busy before save and restore iHW registers
adustm Jun 8, 2017
3783556
STM32F4 set HSE timeout value to 100ms
jeromecoutant Jun 1, 2017
0e1dcd8
platform: Add NonCopyable class.
pan- Jun 20, 2017
34810e2
platform: Tag classes DirHandle, FileHandle, FileLike, FileSystemHand…
pan- Jun 20, 2017
e1bb30d
platform: Replace private copy constructor and copy assignement opera…
pan- Jun 20, 2017
45163dd
rtos: Tag non value type as NonCopyable.
pan- Jun 20, 2017
b1c5ca6
rtos Thread: Remove private copy constructor and assignment operators…
pan- Jun 20, 2017
dfafc90
event: Make the event queue non copyable.
pan- Jun 20, 2017
a7f958c
drivers: Replace private copy constructor and Copy assignement operat…
pan- Jun 20, 2017
ebb1689
drivers: Mark non identity types as non copyable with the NonCopyable…
pan- Jun 20, 2017
16be3ff
Fix style issues in IAR exporter
theotherjimmy Jun 20, 2017
306fd29
cmain IAR: add mbed main
0xc0170 Jun 21, 2017
556f416
bd: Fix missing init in MBRBlockDevice
geky Jun 21, 2017
747fdec
bd: Add asserts on initialization in HeapBlockDevice
geky Jun 21, 2017
fe16211
STM32 : mbed_overrides.c is common for all families
jeromecoutant Jun 8, 2017
07df260
DISCO_L475VG_IOT01A: Update toolchain files for cmsis5
bcostm Jun 26, 2017
a2a7b94
DISCO_L475VG_IOT01A: Update system init for cmsis5
bcostm Jun 26, 2017
edf99af
DISCO_L475VG_IOT01A: Add missing nvic_addr.h file
bcostm Jun 26, 2017
4952451
STM32 : targets.json file simplification
jeromecoutant Jun 21, 2017
e161088
remove hardcode uart pins definition for nRF52 SoCs
nvlsianpu Jun 27, 2017
1b7a155
RTX: Fixed RTXv5 mutex owner list handling.
bulislaw Jun 27, 2017
fc6d7aa
F7 ST CUBE V1.7.0
adustm Jun 19, 2017
37db436
STM32F4: json clock source configuration
jeromecoutant Jun 22, 2017
17601c0
fatfs: Removed unused fat_filesystem_set_errno function
geky Jun 14, 2017
7d8c2e3
events: Adopt osEventFlags from RTX 5
geky Jun 15, 2017
0440023
enable HSI after waking from stop mode so ADC functions properly
mfiore02 Jun 16, 2017
dd4096d
rtos: Add missing destructor for MemoryPool objects.
pan- Jun 21, 2017
e0280eb
rtos: Add missing Queue destructor.
pan- Jun 21, 2017
b869b99
Add support for VBLUno51 board [TARGET_VBLUNO51]
iotmember Jun 25, 2017
cb3d625
Remove comment in sdk_config.h
iotmember Jun 27, 2017
50ea935
STM32: fix us ticker set event timestamp
0xc0170 Jun 26, 2017
4d6f717
Increase L0 ADC sample time
LMESTM Jun 27, 2017
9797c7c
Correct comments in flash api for STM32 L0 targets
LMESTM Jun 28, 2017
e911d98
retarget: fix microlib for mbed 2
0xc0170 Jun 29, 2017
cea5909
STM32: analag_out: Use dynamic handle in object rather than static
LMESTM Jun 12, 2017
7eab814
STM32: analog_out: Enable Buffer and switch
LMESTM Jun 12, 2017
90f0c63
STM32: analog_out: generalize code for multiple instance handling
LMESTM Jun 12, 2017
85b382b
STM32: STM32L475xG dac_s common definition
LMESTM Jun 22, 2017
325ffbc
STM32: STM32F413xH dac_s common definition
LMESTM Jun 27, 2017
878b4bf
Add FlashIAP support for REALTEK_RTL8195AM
Archcady Jun 15, 2017
9ef8909
Coding style fix
Archcady Jun 27, 2017
62463a3
Updated MBED versionning block for patch release
adbridge Jul 3, 2017
2300386
NUCLEO_F429ZI/mbedtls: add SHA256 hw_acceleration
adustm Mar 9, 2017
8dc7851
Align SHA256 with MD5 and SHA1 implementation
adustm May 23, 2017
6d0903b
Replace 64 by MBEDTLS_SHA256_BLOCK_SIZE
adustm May 23, 2017
a8ab0e4
SHA256: get ready to return error codes
adustm May 29, 2017
600742b
Remove trailing whitespace
adustm May 29, 2017
09a50ef
Handle context swapping + rename macro ST_SHA256_BLOCK_SIZE
adustm Jun 2, 2017
acc3942
Add test of sha256_clone function
adustm Jun 6, 2017
431218e
Check HASH is not busy before save/resteore context
adustm Jun 8, 2017
7b33104
Re-add #define previously removed
adbridge Jul 3, 2017
597a4a9
IAR: remove stm32f413 from definitions
0xc0170 Jul 4, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ All changes in code base should originate from GitHub Issues and take advantage
Guidelines from this document are created to help new and existing contributors understand process workflow and align to project rules before pull request is submitted. It explains how a participant should do things like format code, test fixes, and submit patches.

## Where to get more information?
You can read more on our [documentation page](https://docs.mbed.com/).
You can read more on our [documentation page](https://docs.mbed.com/docs/mbed-os-handbook/en/latest/cont/contributing/).

# How to contribute
We really appreciate your contributions! We are Open Source project and we need your help. We want to keep it as easy as possible to contribute changes that get things working in your environment. There are a few guidelines that we need contributors to follow so that we can have a chance of keeping on top of things.
Expand Down
167 changes: 167 additions & 0 deletions TESTS/mbedtls/multi/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
/*
* Copyright (c) 2013-2016, ARM Limited, All Rights Reserved
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <stdio.h>
#include <string.h>
#include "mbed.h"
#include "greentea-client/test_env.h"
#include "unity/unity.h"
#include "utest/utest.h"

#include "mbedtls/sha256.h"


using namespace utest::v1;

#if defined(MBEDTLS_SHA256_C)
/* Tests several call to mbedtls_sha256_update function that are not modulo 64 bytes */
void test_case_sha256_split() {
const unsigned char test_buf[] = {"abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopqabcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopqabcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"};
// sha256_output_values for 3*abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq
const unsigned char test_sum[] =
{ 0x50, 0xEA, 0x82, 0x5D, 0x96, 0x84, 0xF4, 0x22,
0x9C, 0xA2, 0x9F, 0x1F, 0xEC, 0x51, 0x15, 0x93,
0xE2, 0x81, 0xE4, 0x6A, 0x14, 0x0D, 0x81, 0xE0,
0x00, 0x5F, 0x8F, 0x68, 0x86, 0x69, 0xA0, 0x6C};
unsigned char outsum[32];
int i;

mbedtls_sha256_context ctx;
printf("test sha256\n");
mbedtls_sha256_init( &ctx );
mbedtls_sha256_starts( &ctx, 0);
#if 0
printf("test not splitted\n");
mbedtls_sha256_update( &ctx, test_buf, 168 );
#else
printf("test splitted into 3 pieces\n");
mbedtls_sha256_update( &ctx, test_buf, 2 );
mbedtls_sha256_update( &ctx, test_buf+2, 66 );
mbedtls_sha256_update( &ctx, test_buf+68, 100 );
#endif

mbedtls_sha256_finish( &ctx, outsum );
mbedtls_sha256_free( &ctx );

printf("\nreceived result : ");
for (i=0;i<32;i++) { printf("%02X",outsum[i]);}
printf("\nawaited result : 50EA825D9684F4229CA29F1FEC511593E281E46A140D81E0005F8F688669A06C\n"); // for abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq

printf("\nend of test sha256\n");
TEST_ASSERT_EQUAL_UINT8_ARRAY(outsum, test_sum,32);
}

/* Tests that treating 2 sha256 objects in // does not impact the result */
void test_case_sha256_multi() {
const unsigned char test_buf[] = {"abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopqabcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopqabcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"};
const unsigned char test_buf2[] = {"abcdefghijklmnopqrstuvwxyz012345678901234567890123456789"};

// sha256_output_values for abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq
const unsigned char test_sum1[] =
{ 0x24, 0x8D, 0x6A, 0x61, 0xD2, 0x06, 0x38, 0xB8,
0xE5, 0xC0, 0x26, 0x93, 0x0C, 0x3E, 0x60, 0x39,
0xA3, 0x3C, 0xE4, 0x59, 0x64, 0xFF, 0x21, 0x67,
0xF6, 0xEC, 0xED, 0xD4, 0x19, 0xDB, 0x06, 0xC1 };
// sha256_output_values for 3*abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq
const unsigned char test_sum2[] =
{ 0x50, 0xEA, 0x82, 0x5D, 0x96, 0x84, 0xF4, 0x22,
0x9C, 0xA2, 0x9F, 0x1F, 0xEC, 0x51, 0x15, 0x93,
0xE2, 0x81, 0xE4, 0x6A, 0x14, 0x0D, 0x81, 0xE0,
0x00, 0x5F, 0x8F, 0x68, 0x86, 0x69, 0xA0, 0x6C};
// sha256_output_values for abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopqabcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopqabcdefghijklmnopqrstuvwxyz012345678901234567890123456789
const unsigned char test_sum3[] =
{ 0x6D, 0x5D, 0xDB, 0x5F, 0x4A, 0x94, 0xAB, 0x7E,
0x5C, 0xF7, 0x9A, 0xD8, 0x3F, 0x58, 0xD3, 0x97,
0xFE, 0x79, 0xFB, 0x0D, 0x79, 0xB2, 0x0D, 0x22,
0xFF, 0x95, 0x9F, 0x04, 0xA2, 0xE4, 0x6C, 0x68};
unsigned char outsum1[32], outsum2[32], outsum3[32];
int i;

mbedtls_sha256_context ctx1;
mbedtls_sha256_context ctx2;
mbedtls_sha256_context ctx3;
printf("test sha256_multi\n");
//Init both contexts
mbedtls_sha256_init( &ctx1);
mbedtls_sha256_init( &ctx2);
mbedtls_sha256_init( &ctx3);
//Start both contexts
mbedtls_sha256_starts( &ctx1, 0);
mbedtls_sha256_starts( &ctx2, 0);

printf("upd ctx1\n");
mbedtls_sha256_update( &ctx1, test_buf, 56 );
printf("upd ctx2\n");
mbedtls_sha256_update( &ctx2, test_buf, 66 );
printf("finish ctx1\n");
mbedtls_sha256_finish( &ctx1, outsum1 );
printf("upd ctx2\n");
mbedtls_sha256_update( &ctx2, test_buf+66, 46 );
printf("clone ctx2 in ctx3\n");
mbedtls_sha256_clone(&ctx3, (const mbedtls_sha256_context *)&ctx2);
printf("free ctx1\n");
mbedtls_sha256_free( &ctx1 );
printf("upd ctx2\n");
mbedtls_sha256_update( &ctx2, test_buf+112, 56 );
printf("upd ctx3 with different values than ctx2\n");
mbedtls_sha256_update( &ctx3, test_buf2, 56 );
printf("finish ctx2\n");
mbedtls_sha256_finish( &ctx2, outsum2 );
printf("finish ctx3\n");
mbedtls_sha256_finish( &ctx3, outsum3 );
printf("free ctx2\n");
mbedtls_sha256_free( &ctx2 );
printf("free ctx3\n");
mbedtls_sha256_free( &ctx3 );

printf("\nreceived result ctx1 : ");
for (i=0;i<32;i++) { printf("%02X",outsum1[i]);}
printf("\nawaited result : 248D6A61D20638B8E5C026930C3E6039A33CE45964FF216F6ECEDD19DB06C1\n"); // for abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq
printf("\nreceived result ctx2 : ");
for (i=0;i<32;i++) { printf("%02X",outsum2[i]);}
printf("\nawaited result : 50EA825D9684F4229CA29F1FEC511593E281E46A140D81E0005F8F688669A06C\n"); // for 3*abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq
printf("\nreceived result ctx3 : ");
for (i=0;i<32;i++) { printf("%02X",outsum3[i]);}
printf("\nawaited result : 6D5DDB5F4A94AB7E5CF79AD83F58D397FE79FB0D79B20D22FF959F04A2E46C68\n"); // for 2*abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq+3*0123456789
printf("\nend of test sha256\n");
TEST_ASSERT_EQUAL_UINT8_ARRAY(outsum1, test_sum1,32);
TEST_ASSERT_EQUAL_UINT8_ARRAY(outsum2, test_sum2,32);
TEST_ASSERT_EQUAL_UINT8_ARRAY(outsum3, test_sum3,32);
}
#endif //MBEDTLS_SHA256_C

utest::v1::status_t greentea_failure_handler(const Case *const source, const failure_t reason) {
greentea_case_failure_abort_handler(source, reason);
return STATUS_CONTINUE;
}

Case cases[] = {
#if defined(MBEDTLS_SHA256_C)
Case("Crypto: sha256_split", test_case_sha256_split, greentea_failure_handler),
Case("Crypto: sha256_multi", test_case_sha256_multi, greentea_failure_handler),
#endif
};

utest::v1::status_t greentea_test_setup(const size_t number_of_cases) {
GREENTEA_SETUP(10, "default_auto");
return greentea_test_setup_handler(number_of_cases);
}

Specification specification(greentea_test_setup, cases, greentea_test_teardown_handler);

int main() {
Harness::run(specification);
}
5 changes: 5 additions & 0 deletions cmsis/TOOLCHAIN_IAR/cmain.S
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
EXTERN exit
EXTERN __iar_dynamic_initialization
EXTERN mbed_sdk_init
EXTERN mbed_main
EXTERN SystemInit

THUMB
Expand Down Expand Up @@ -87,6 +88,10 @@ _call_main:
FUNCALL __cmain, __iar_argc_argv
BL __iar_argc_argv ; Maybe setup command line

MOVS r0,#0 ; No parameters
FUNCALL __cmain, mbed_main
BL mbed_main

FUNCALL __cmain, main
BL main
_main:
Expand Down
6 changes: 2 additions & 4 deletions drivers/BusIn.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include "platform/platform.h"
#include "drivers/DigitalIn.h"
#include "platform/PlatformMutex.h"
#include "platform/NonCopyable.h"

namespace mbed {
/** \addtogroup drivers */
Expand All @@ -28,7 +29,7 @@ namespace mbed {
* @note Synchronization level: Thread safe
* @ingroup drivers
*/
class BusIn {
class BusIn : private NonCopyable<BusIn> {

public:
/* Group: Configuration Methods */
Expand Down Expand Up @@ -115,12 +116,9 @@ class BusIn {

PlatformMutex _mutex;

/* disallow copy constructor and assignment operators */
private:
virtual void lock();
virtual void unlock();
BusIn(const BusIn&);
BusIn & operator = (const BusIn&);
};

} // namespace mbed
Expand Down
8 changes: 2 additions & 6 deletions drivers/BusInOut.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

#include "drivers/DigitalInOut.h"
#include "platform/PlatformMutex.h"
#include "platform/NonCopyable.h"

namespace mbed {
/** \addtogroup drivers */
Expand All @@ -27,7 +28,7 @@ namespace mbed {
* @note Synchronization level: Thread safe
* @ingroup drivers
*/
class BusInOut {
class BusInOut : private NonCopyable<BusInOut> {

public:

Expand Down Expand Up @@ -135,11 +136,6 @@ class BusInOut {
int _nc_mask;

PlatformMutex _mutex;

/* disallow copy constructor and assignment operators */
private:
BusInOut(const BusInOut&);
BusInOut & operator = (const BusInOut&);
};

} // namespace mbed
Expand Down
8 changes: 2 additions & 6 deletions drivers/BusOut.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,15 @@

#include "drivers/DigitalOut.h"
#include "platform/PlatformMutex.h"
#include "platform/NonCopyable.h"

namespace mbed {
/** \addtogroup drivers */

/** A digital output bus, used for setting the state of a collection of pins
* @ingroup drivers
*/
class BusOut {
class BusOut : private NonCopyable<BusOut> {

public:

Expand Down Expand Up @@ -119,11 +120,6 @@ class BusOut {
int _nc_mask;

PlatformMutex _mutex;

/* disallow copy constructor and assignment operators */
private:
BusOut(const BusOut&);
BusOut & operator = (const BusOut&);
};

} // namespace mbed
Expand Down
3 changes: 2 additions & 1 deletion drivers/CAN.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include "hal/can_api.h"
#include "platform/Callback.h"
#include "platform/PlatformMutex.h"
#include "platform/NonCopyable.h"

namespace mbed {
/** \addtogroup drivers */
Expand Down Expand Up @@ -78,7 +79,7 @@ class CANMessage : public CAN_Message {
/** A can bus client, used for communicating with can devices
* @ingroup drivers
*/
class CAN {
class CAN : private NonCopyable<CAN> {

public:
/** Creates an CAN interface connected to specific pins.
Expand Down
3 changes: 2 additions & 1 deletion drivers/Ethernet.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#define MBED_ETHERNET_H

#include "platform/platform.h"
#include "platform/NonCopyable.h"

#if defined (DEVICE_ETHERNET) || defined(DOXYGEN_ONLY)

Expand Down Expand Up @@ -54,7 +55,7 @@ namespace mbed {
* @endcode
* @ingroup drivers
*/
class Ethernet {
class Ethernet : private NonCopyable<Ethernet> {

public:

Expand Down
3 changes: 2 additions & 1 deletion drivers/FlashIAP.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include "flash_api.h"
#include "platform/SingletonPtr.h"
#include "platform/PlatformMutex.h"
#include "platform/NonCopyable.h"

namespace mbed {

Expand All @@ -37,7 +38,7 @@ namespace mbed {
* @note Synchronization level: Thread safe
* @ingroup drivers
*/
class FlashIAP {
class FlashIAP : private NonCopyable<FlashIAP> {
public:
FlashIAP();
~FlashIAP();
Expand Down
3 changes: 2 additions & 1 deletion drivers/I2C.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include "hal/i2c_api.h"
#include "platform/SingletonPtr.h"
#include "platform/PlatformMutex.h"
#include "platform/NonCopyable.h"

#if DEVICE_I2C_ASYNCH
#include "platform/CThunk.h"
Expand Down Expand Up @@ -53,7 +54,7 @@ namespace mbed {
* @endcode
* @ingroup drivers
*/
class I2C {
class I2C : private NonCopyable<I2C> {

public:
enum RxStatus {
Expand Down
3 changes: 2 additions & 1 deletion drivers/InterruptIn.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include "platform/Callback.h"
#include "platform/mbed_critical.h"
#include "platform/mbed_toolchain.h"
#include "platform/NonCopyable.h"

namespace mbed {
/** \addtogroup drivers */
Expand Down Expand Up @@ -56,7 +57,7 @@ namespace mbed {
* @endcode
* @ingroup drivers
*/
class InterruptIn {
class InterruptIn : private NonCopyable<InterruptIn> {

public:

Expand Down
9 changes: 2 additions & 7 deletions drivers/InterruptManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include "cmsis.h"
#include "platform/CallChain.h"
#include "platform/PlatformMutex.h"
#include "platform/NonCopyable.h"
#include <string.h>

namespace mbed {
Expand Down Expand Up @@ -53,7 +54,7 @@ namespace mbed {
* @endcode
* @ingroup drivers
*/
class InterruptManager {
class InterruptManager : private NonCopyable<InterruptManager> {
public:
/** Get the instance of InterruptManager Class
*
Expand Down Expand Up @@ -138,12 +139,6 @@ class InterruptManager {
void lock();
void unlock();

// We declare the copy contructor and the assignment operator, but we don't
// implement them. This way, if someone tries to copy/assign our instance,
// he will get an error at compile time.
InterruptManager(const InterruptManager&);
InterruptManager& operator =(const InterruptManager&);

template<typename T>
pFunctionPointer_t add_common(T *tptr, void (T::*mptr)(void), IRQn_Type irq, bool front=false) {
_mutex.lock();
Expand Down
Loading