Commit Graph

1003 Commits (c18e1786cd914a7494168ac107a77ac7b46ef2be)

Author SHA1 Message Date
Christopher Haster f8917e1cd9 callback - Removed problematic callback overloads
Unfortunately, it is very difficult to infer the parameters of
function-objects generically in C++03 without any additional type
information. The current implementation fails to do so, and the compiler
simply bails with "unable to deduce template parameter".

Rather than leaving the user with a small novel of error messages, this
patch removes the problematic callback overloads, leaving only callback
overloads for the original pointer types.
2016-09-29 16:30:49 -05:00
Sam Grove 2564a833c0 Merge pull request #2822 from anangl/master
TARGET_NRF5: Removed waiting for TX completed from 'serial_putc()'.
2016-09-28 15:37:58 -07:00
Sam Grove 9e1b53f6d3 Merge pull request #2851 from geky/callback-function-objects
callback - Add size-limited function-object overloads to Callback
2016-09-28 15:00:09 -07:00
Sam Grove 7608401f2b Merge pull request #2810 from toyowata/master
[LPC1347] Fix PwmOut prescaler for 16-bit timer
2016-09-28 14:58:55 -07:00
Sam Grove 3d1531fcb1 Merge pull request #2767 from mikaleppanen/lwip_2_0
Replace lwIP 1.4.1 with lwIP 2.0
2016-09-28 14:58:22 -07:00
Christopher Haster 161a2ec259 callback - Added size-limited function-object overloads to Callback
The callback class can now accept generalized function-objects:

    class Thing {
    public:
        int value;

        void operator()() {
            printf("hi! %d\n", value);
        }
    };

    Callback<void()> cb(Thing(2));

However, with the intention of avoiding implicit dynamic-memory
allocations, the Callback class is limited to a single word of storage.
Exceeding this size will eliminate the function-object type from the
overload set and fail to compile.

Effort was invested to make this situation very clear to the user. Here
is an example error message with noise removed:

    [ERROR] ./main.cpp: In function 'int main()':
    ./mbed-os/hal/api/Ticker.h:101:10: note:
        no known conversion for argument 1 from 'BigFunc' to 'mbed::Callback<void()>'

The real benefit of this change is the ability for users to hook into
the attributes of the Callback class. This mostly allows lifetime
management of the function-objects from third-party libraries (such as
the Event class from mbed-events).

Note: The convenient `callback` function may become ambiguous if
provided with a type that defines multiple incompatible `operator()`
member functions.
2016-09-28 12:23:29 -05:00
Christopher Haster 804a621231 callback - Moved internal dispatch mechanism to generated op-table
This allows additional attributes to be attached to the internally
generated type such as move and destructor operations with no increase
in RAM footprint.

The current overloads can't take advantage of this, but it does open
the possibility for more powerful overloads that can provide these
additional attributes.

Changes to mbed-os memory consumption:

        .text   .data   .bss
before  57887   2292    7692
after   57842   2292    7691
2016-09-28 12:23:24 -05:00
svastm 0766d39746 STM32F4 - Enable the low power timer
Enable the low power timer for the following targets:
 - NUCLEO_F411RE
 - NUCLEO_F401RE
 - DISCO_F429ZI
 - NUCLEO_F446RE
 - NUCLEO_F410RB
 - DISCO_F469NI
 - NUCLEO_F446ZE
 - B86B_F446VE
2016-09-28 09:36:37 +02:00
svastm 21b11a26ec STM32F4 - Add low power timer 2016-09-28 09:31:03 +02:00
Mika Leppänen 2bad43d7ca Corrected K66F and K64F drivers to make "or" operation instead of "and" when multicast
group address is added to filter.
2016-09-28 08:48:43 +03:00
Głąbek, Andrzej 86005da023 Merge branch 'master' of https://github.com/ARMmbed/mbed-os
* 'master' of https://github.com/ARMmbed/mbed-os: (63 commits)
  [XDOT_L151] add IAR support
  Modify mbedtls scripts to add config-no-entropy.h
  Remove extra spaces
  [XDOT_L151] include xDot in mbed 5 releases
  [STM32F429ZI] INITIAL_SP correction
  [STM32F091RC] patch for tests-mbedmicro-rtos-mbed-threads
  mbedtls trng - remove MBEDTLS_ENTROPY_HARDWARE_ALT
  targets - add TRNG device_has to STM32F7 targets
  mbedtls - move TRNG mbed impl into platform folder
  TRNG HAL - fix length doc wording for get_bytes
  HAL TRNG - add dummy variable to empty structs
  TRNG - protect HAL implementation if DEVICE_TRNG is not defined
  TRNG - remove set seed function
  HAL - RNG rename to TRNG
  HAL - rng nuvoton cleanup code style
  RNG - fix warnings due to obj not used for some targets
  RNG - rename rng_get_numbers to rng_get_bytes
  mbedtls - mbed wrapper rename to mbed_rng
  HAL: Add rng set seed value function
  NUMAKER_PFM_NUC472: Add RGN HAL API implementation
  ...

# Conflicts:
#	hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/serial_api.c
2016-09-28 07:06:28 +02:00
Sam Grove 58c12f19b2 Merge pull request #2824 from jeromecoutant/PR_F429ZI_SP
[STM32F429ZI] INITIAL_SP correction
2016-09-27 21:56:24 -07:00
Sam Grove 4a6558083e Merge pull request #2814 from bcostm/adcintch_F3
STM32F3xx - Add support of ADC internal channels
2016-09-27 21:54:27 -07:00
Sam Grove 681cff8010 Merge pull request #2785 from pan-/remove_warnings_from_nordic_target
TARGET_NRF - Remove warnings from nordic target.
2016-09-27 21:53:28 -07:00
Sam Grove d204d69003 Merge pull request #2749 from bcostm/serialFC_disco-f746ng
DISCO_F746NG - Add Serial Flow Control pins
2016-09-27 21:52:37 -07:00
Sam Grove 50c30d384d Merge pull request #2741 from pan-/conf_flush_at_exit
Add configuration for IO flushing during exit.
2016-09-27 21:52:13 -07:00
Sam Grove 5ef720246b Merge pull request #2726 from jeromecoutant/PR_NUCLEO_F207ZG_D11
[NUCLEO_F207ZG] Conflict with Arduino D11 and Ethernet port
2016-09-27 21:51:48 -07:00
Sam Grove 66329c4e71 Merge pull request #2827 from MultiTechSystems/xdot-add-release
include MultiTech xDot in mbed 5 releases
2016-09-27 18:42:58 -07:00
Mike Fiore 7b2942157a [XDOT_L151] add IAR support 2016-09-27 16:09:15 -05:00
Andres AG 21a7b1de04 Modify mbedtls scripts to add config-no-entropy.h 2016-09-27 16:19:39 +01:00
Mike Fiore 1b8cb3ca76 [XDOT_L151] include xDot in mbed 5 releases 2016-09-27 08:48:08 -05:00
jeromecoutant dfbb5675ed [STM32F429ZI] INITIAL_SP correction 2016-09-27 14:39:20 +02:00
Głąbek, Andrzej d0eed52cde Removed waiting for TX completed from 'serial_putc()', moved it to 'serial_init()' to allow passing tests MBED_37/38. 2016-09-27 14:03:42 +02:00
Martin Kojtal ef58562ad0 targets - add TRNG device_has to STM32F7 targets 2016-09-27 09:14:48 +01:00
Martin Kojtal 88b2220548 TRNG HAL - fix length doc wording for get_bytes 2016-09-27 09:14:37 +01:00
Martin Kojtal 48544fc6eb HAL TRNG - add dummy variable to empty structs
Otherwise it's implementation specific, IAR fails to compile.
2016-09-27 09:14:31 +01:00
Martin Kojtal f8c6c23ced TRNG - protect HAL implementation if DEVICE_TRNG is not defined 2016-09-27 09:14:26 +01:00
Martin Kojtal 9048113562 TRNG - remove set seed function 2016-09-27 09:14:21 +01:00
Martin Kojtal ea1041ea36 HAL - RNG rename to TRNG 2016-09-27 09:13:59 +01:00
Martin Kojtal da1b423685 HAL - rng nuvoton cleanup code style 2016-09-27 08:51:53 +01:00
Martin Kojtal a225bafdbb RNG - fix warnings due to obj not used for some targets 2016-09-27 08:51:51 +01:00
Martin Kojtal e8ca16dde7 RNG - rename rng_get_numbers to rng_get_bytes 2016-09-27 08:51:49 +01:00
Martin Kojtal 1d9cacbbd2 HAL: Add rng set seed value function 2016-09-27 08:51:45 +01:00
Martin Kojtal 5e351c201a NUMAKER_PFM_NUC472: Add RGN HAL API implementation 2016-09-27 08:51:42 +01:00
Martin Kojtal 72fac611f2 STM32F4/F7: Add RNG HAL implementation 2016-09-27 08:51:40 +01:00
Martin Kojtal 02fd613a81 k66f: add RNG HAL implementation 2016-09-27 08:51:37 +01:00
0xc0170 132a5bbff3 k64f: add RNG HAL implementation
Replaces old mbedtls entropy file, to use new RNG HAL API.
2016-09-27 08:51:31 +01:00
0xc0170 6da5515e1c HAL: add RGN API
Provides init, free and get numbers functions.
2016-09-27 08:51:26 +01:00
Mike Fiore 4820c87c68 [XDOT_L151] add SWD & UART pin names to match pinout diagram 2016-09-27 00:13:08 -07:00
Mike Fiore a93b7d2651 [XDOT_L151] add RTOS configuration for xDot 2016-09-27 00:13:08 -07:00
Mike Fiore 1f40f3de97 [XDOT_L151] initial SP for ARM_STD build was set to 0x2008000 instead of 0x20008000 & caused DAPLink to reject FW 2016-09-27 00:13:08 -07:00
Mike Fiore 7836c6eaf1 rebase support for MultiTech xDot platform
[XDOT_L151] copy new target CMSIS files from NZ32_SC151 target

[XDOT_L151] remove Modtronix code, add HardFault_Handler, update clock configuration to match xDot hardware

[XDOT_L151] copy new target HAL files from NZ32_SC151 target

[XDOT_L151] update HAL to match xDot hardware

[XDOT_L151] add xdot_eeprom.* and xdot_low_power.* files

[XDOT_L151] add RTOS support for target

Conflicts:
	rtos/rtx/TARGET_CORTEX_M/RTX_Conf_CM.c

[XDOT_L151] match NUCLEO_L152RE startup code for GCC_ARM so RTOS works

[XDOT_L151] fix GPIO write failure

[XDOT_L151] add XDOT_L151CC target to targets.json

[XDOT_L151] change xDot default stack size to 256 bytes and main stack size to 1.5kB

[XDOT_L151] update PinNames.h to match rev E hardware - no change to external pinout

[XDOT_L151] update style in custom xDot HAL files

Conflicts:
	rtos/rtx/TARGET_CORTEX_M/RTX_CM_lib.h
	rtos/rtx/TARGET_CORTEX_M/RTX_Conf_CM.c
2016-09-27 00:13:08 -07:00
Vincent Coubard 815551380f TARGET_NRF51_DONGLE_LEGACY - Add NRF51_DONGLE to the list of paths available for this target. 2016-09-26 23:56:33 -07:00
Vincent Coubard 46ab3cab79 NRF51_DK_LEGACY: Add the path TARGET_NRF51_DK to the list of available paths.
This fix the build of this target.
2016-09-26 23:56:33 -07:00
Vincent Coubard d61ab652de NRF51_DONGLE - remove ANALOGIN from the list of capabilities. 2016-09-26 23:56:33 -07:00
Vincent Coubard 8f79b6dbc8 NORDIC - Update NRF51_DONGLE target to takes advantage of the NRF5 implementation
of BLE and device drivers.
2016-09-26 23:56:33 -07:00
Vincent Coubard 9dd0c672ca HAL - Add a newline at the end of hal/api/Callback.h.
This remove a warning issued by ARMCC.
2016-09-26 23:10:24 -07:00
svastm 9f85f77001 STM32F7 - Add low power timer
Enable the low power timer for the following targets:
 - NUCLEO_F746ZG
 - NUCLEO_F767ZI
 - DISCO_F746NG
 - DISCO_F767ZI
2016-09-26 21:34:07 -07:00
svastm 49335577e1 STM32F7 - Add low power timer 2016-09-26 21:34:07 -07:00
Sam Grove 5310c2e2cd Merge pull request #2762 from svastm/lp_timer_l0
STM32L0 - Add low power timer
2016-09-26 21:33:27 -07:00