Commit Graph

25260 Commits (c6fbcb4efe40093c20a3bce44c2d687d49323746)

Author SHA1 Message Date
mjm2017 c6fbcb4efe
Update AnalogOut.h 2019-07-03 06:51:04 +02:00
mjm2017 b0795821a1
Deinitialize the pin definition
Without freeing the DAC, the pin will continue to be configured as DAC. Which make it impossible to change it from Analogout to anything else. 
Check this code that allow you to change the AnalogOut to DigitalOut

<<code>>
#include "mbed.h"

class myAnalog : public AnalogOut{
    public:

    myAnalog(PinName myname);
    ~myAnalog();
    
 PinName _myname;        
};
    
myAnalog::myAnalog(PinName myname):AnalogOut(myname),
                                   _myname(myname){
                                       ;
                                   
}
 myAnalog::~myAnalog(){
   analogout_free(&this->_dac);
 }

myAnalog *x=0;
DigitalOut *xx=0;
void do_something_analog() {
    x=new myAnalog(PA_4);
    double g=0.0;
    while(g<0.5){
    x->write(g);
    g=g+0.1;
    wait_ms(50);
    }
     if (x!=0){
      delete x;
      x=0;
    }
}

void do_something_digital() {
    xx=new DigitalOut(PA_4);
    for(int i=0;i<10;i++){
        *xx = 1;
       wait_ms(50);
        *xx = 0;
        wait_ms(50);
    }
   if (xx!=0){
      delete xx;
      xx=0;
    }
}

int main()
{
    printf("\nAnalog loop example\n");
    while(1) {
    do_something_digital();
    do_something_analog();    


 }
}

<</code>>
2019-07-01 21:18:43 +02:00
Martin Kojtal 279925b6fc
Merge pull request #10869 from mathias-arm/master
LPC55S69: fix cosFactor data size in header file
2019-07-01 09:27:57 +01:00
Martin Kojtal be2c2bed30
Merge pull request #10884 from jeromecoutant/PR_H743ZI2
NUCLEO_H743ZI2 new target support
2019-07-01 09:27:31 +01:00
Martin Kojtal d2c73f2bcd
Merge pull request #10842 from ghseb/cellular-stack-type-fixes
Cellular: Stack type fixes
2019-07-01 09:23:21 +01:00
Martin Kojtal 9e0dc3e198
Merge pull request #10859 from malavikasajikumar/master
Removing I2C and SPI pin names in SDP-K1 PinNames.h file.
2019-07-01 09:23:06 +01:00
Martin Kojtal 755c6b8c2f
Merge pull request #10861 from pauluap/lwip_use_recursive_mutex
Make the sys_arch_protect() mutex be recursive.
2019-07-01 09:19:29 +01:00
Martin Kojtal d71db32154
Merge pull request #10881 from AGlass0fMilk/fix-nrf52-critical-region-api
Fix Nordic/Mbed Critical Section API Inconsistency (In Builds w/o Softdevice)
2019-07-01 09:18:10 +01:00
Martin Kojtal 6be510daa4
Merge pull request #10900 from TeroJaasko/armcc5_compilation_fixes
Armcc5 compilation fixes
2019-07-01 09:16:56 +01:00
Martin Kojtal 76f085bf2f
Merge pull request #10908 from kivaisan/fix_armc6_netconn_recv_tcp_pbuf
Fix netconn_recv_tcp_pbuf ARMC6 linker error
2019-07-01 09:16:36 +01:00
Martin Kojtal 193ba0fdea
Merge pull request #10910 from kivaisan/increase_dns_response_wait_time
Increase dns-response-wait-time
2019-07-01 09:16:10 +01:00
Martin Kojtal 60d047cae3
Merge pull request #10840 from u-blox/socket_flag_update
Cellular: cellular socket flags updated
2019-07-01 09:04:16 +01:00
Martin Kojtal 85c477c1dc
Merge pull request #10609 from kjbracey-arm/us_ticker_optimise
wait_us optimization
2019-06-28 14:29:00 +01:00
Martin Kojtal dfdf70b873
Merge pull request #10767 from maciejbocianski/msd_test_windows_unmount_fix
usb_device-msd test: fix powershell unmount script issue
2019-06-28 14:24:53 +01:00
Martin Kojtal 61c4d05ce9
Merge pull request #10824 from ABOSTM/PRSTM32_PWMWRTIE_GLITCH_10734
STM32: pwmout_write: configure channel only when not already enabled
2019-06-28 14:24:14 +01:00
Martin Kojtal a2c9152441
Merge pull request #10700 from LMESTM/hal_sleep_manager_test_update
Update HAL Sleep manager test to cope with STM32 LPTIM HW
2019-06-28 13:19:10 +01:00
Kevin Bracey c5b9779858 Remote "static" from MBED_FORCEINLINE
Static keyword causes problems when trying to use force-inlined
functions from normal inlined functions. This is not legal:

    static inline void forced() { }

    inline void normal() { forced(); }

You cannot reference internal-linkage things from external-linkage
inline functions.

Removal of the static implies that in C there would need to be a
non-inline definition in case anyone calls it non-inlined, but if the
force attribute is doing its job, that should not happen.

Only significant in-tree user of the MBED_FORCEINLINE macro is
the atomic operations - making this change permits atomic operations
from non-static inline functions.
2019-06-27 16:12:30 +03:00
Kimmo Vaisanen df1d36ebb2 Increase dns-response-wait-time
In some cellular networks or with some modems, DNS response can take longer than 5 seconds to arrive.
2019-06-27 15:27:01 +03:00
Kimmo Vaisanen ff88a751f7 Fix netconn_recv_tcp_pbuf ARMC6 linker error
If "lwip.tcp-enabled" is set to false, ARMC6 compilation fails to error
Error: L6218E: Undefined symbol netconn_recv_tcp_pbuf

LWIP::socket_recv() is TCP socket specific method so implementation can be
enabled only when LWIP_TCP flag is set.
2019-06-27 14:18:07 +03:00
Martin Kojtal 201a264051
Merge pull request #10791 from hugueskamba/fix-lpc55s69-bootloader-segmentation
bootloader: Fix LPC55S69 bootloader segmentation
2019-06-27 10:22:55 +01:00
Martin Kojtal eee8d0a768
Merge pull request #10781 from LMESTM/Idle_Stack_Size_For_Tickless
Include TICKLESS stack size increase even without LPTICKER_DELAY_TICKS
2019-06-27 10:21:45 +01:00
Martin Kojtal d4aab5669d
Merge pull request #10888 from devran01/issue/10883
Remove macro MBEDTLS_PSA_CRYPTO_C from PSA targets
2019-06-27 10:10:47 +01:00
Tero Jääskö bae3043e92 cellular: AT: fix build on ARMCC5
ARMC5 failed to compile the code with debug-profile (!!) as va_list
is getting into std:: namespace when one includes <cstdarg>. Other
compilers seem to be more relaxed, and so is ARMC5 if compiled
with other profiles.

Add the explicit std:: to references of va_list.

While here, remove one extra copy of "#include "PlatformMutex.h""
and a "#include <stdarg.h>" which is kind of duplicate of
"#include <cstdarg>".

Error being fixed:
--8<--8<--8<--
Compile [ 81.8%]: ATHandler.cpp
[Error] ATHandler.h@552,0:  #20: identifier "va_list" is undefined
[Error] ATHandler.cpp@1226,0:  #147: declaration is incompatible with "void mbed::ATHandler::handle_args(const char *, <error-type>)"  (declared at line 552 of "./mbed-os/features/cellular/framework/AT/ATHandler.h")
[ERROR] "./mbed-os/features/cellular/framework/AT/ATHandler.h", line 552: Error:  #20: identifier "va_list" is undefined
"./mbed-os/features/cellular/framework/AT/ATHandler.cpp", line 1226: Error:  #147: declaration is incompatible with "void mbed::ATHandler::handle_args(const char *, <error-type>)"  (declared at line 552 of "./mbed-os/features/cellular/framework/AT/ATHandler.h")
./mbed-os/features/cellular/framework/AT/ATHandler.cpp: 0 warnings, 2 errors
2019-06-26 19:58:34 +03:00
Tero Jääskö 14bb4399b3 nanostack: silence compiler warnings for implicit virtual call_in
ARMCC reminds of the missing virtual declaration of call_in in the
Nanostack.h.

Warnings silenced:
---8<---8<---
Compile [ 52.3%]: LoWPANNDInterface.cpp
[Warning] Nanostack.h@278,0:  #1300-D: call_in inherits implicit virtual
Compile [ 52.4%]: NanostackEMACInterface.cpp
[Warning] Nanostack.h@278,0:  #1300-D: call_in inherits implicit virtual
Compile [ 52.5%]: MeshInterfaceNanostack.cpp
[Warning] Nanostack.h@278,0:  #1300-D: call_in inherits implicit virtual
Compile [ 52.6%]: NanostackEthernetInterface.cpp
[Warning] Nanostack.h@278,0:  #1300-D: call_in inherits implicit virtual
Compile [ 52.7%]: ThreadInterface.cpp
[Warning] Nanostack.h@278,0:  #1300-D: call_in inherits implicit virtual
ompile [ 53.0%]: WisunInterface.cpp
[Warning] Nanostack.h@278,0:  #1300-D: call_in inherits implicit virtual
2019-06-26 16:55:10 +03:00
Hugues Kamba b0804c4a0d bootloader: Fix LPC55S69 bootloader segmentation
As the build tool in mbed-os 5.13 cannot appropriately deal with a segmented
bootloader when combining it with an application, this commit adjusts the
size reserved for interrupts (via the linker file) to avoid a bootloader
segmentation due to an unpopulated ROM area.

The microcontroller has a total of 60 vector interrupts + 16 exception
handlers. The allocated ROM flash for interrupts should be (60 + 16) x word
size in bytes = 76 x 4 = 304 = 0x130.

This commit changes the interrupt reserved space from 0x140 to 0x130.
2019-06-26 13:55:07 +01:00
Martin Kojtal 8a7f5914f6
Merge pull request #10826 from ABOSTM/IAR_EXPORT_STM32H743ZI
Add STM32H743ZI to IAR export definition
2019-06-26 09:22:26 +01:00
Martin Kojtal 924af9481e
Merge pull request #10841 from VVESTM/vve_10827_spi_count
TARGET_STM: Add DEVICE_SPI_COUNT to use SPIs without interference
2019-06-26 09:09:38 +01:00
Martin Kojtal 68c3dc6161
Merge pull request #10864 from anttiylitokola/tlssocket-cert-debug-info
TLSSocket: print certificate info only when tracing is enabled
2019-06-26 09:09:15 +01:00
Martin Kojtal 5350948514
Merge pull request #10896 from hugueskamba/specify-arm-compiler-version-affected-by-uarm-fix
microlib support: Specify compiler version unable to build without the fix
2019-06-26 08:47:27 +01:00
Laurent Meunier 9e8871916d Allow target or application level definition of extra TICKLESS stack size
Adding a check to let application or target force increase idle thread
stack size.
2019-06-25 17:01:39 +02:00
Martin Kojtal b0073bb70d
Merge pull request #10774 from fkjagodzinski/fix-uart_irq
Fix serial IRQ handling
2019-06-25 15:49:41 +01:00
Hugues Kamba 4f38abf8dd microlib support: Specify compiler version unable to build without the fix 2019-06-25 15:44:02 +01:00
Martin Kojtal e9e9bf3f8d
Merge pull request #10879 from Patater/mbed-crypto-everywhere
PSA Crypto for all targets
2019-06-25 15:21:38 +01:00
Martin Kojtal 7954074613
Merge pull request #10704 from hugueskamba/fix-microlib-with-arm-compiler-6
microlib support: Fix build with Arm Compiler 6 and MicroLib
2019-06-25 15:18:57 +01:00
Martin Kojtal 6229322c64
Merge pull request #10846 from bulislaw/crc_doxy
MbedCRC doxygen fixes
2019-06-25 11:09:43 +01:00
Martin Kojtal fa2e0217f2
Merge pull request #10856 from jeromecoutant/PR_CRC_LO
STM32: enable CRC for all L0/L4/F7
2019-06-25 11:08:08 +01:00
Martin Kojtal 3d88bdde30
Merge pull request #10835 from OpenNuvoton/nuvoton_m23_fault-handler
M23: Fix compile error with mbed fault handler
2019-06-25 11:03:32 +01:00
Martin Kojtal 4b438ac1de
Merge pull request #10834 from tymoteuszblochmobica/udp
Fixed UDP sendto if IP version not match
2019-06-25 11:03:03 +01:00
Martin Kojtal 63d1ea36f1
Merge pull request #10821 from kivaisan/refactor_apn_db
Cellular: Refactor APN db implementation to reduce memory usage
2019-06-25 11:02:24 +01:00
Martin Kojtal e39aeff69e
Merge pull request #10706 from hugueskamba/fix-softcoding-mem-pool-size-evaluation
mem pool size: Fix calculation of memory pool size for portability
2019-06-25 10:59:56 +01:00
Martin Kojtal 34eefb49fa
Merge pull request #10858 from LMESTM/fix_cellular_properties
Check Cellular Properties have been set
2019-06-25 10:58:23 +01:00
Martin Kojtal a176bcb941
Merge pull request #10893 from 0xc0170/fix_permission_cellular
cellular: fix file permission
2019-06-25 10:11:55 +01:00
Devaraj Ranganna bd9d615897 Remove MBEDTLS_PSA_CRYPTO_C from PSA NS targets
Signed-off-by: Devaraj Ranganna <devaraj.ranganna@arm.com>
2019-06-25 09:55:59 +01:00
Martin Kojtal 1c5909d48e
Merge pull request #10870 from maciejbocianski/i2c_add_guards
HAL I2C: adds missing DEVICE_I2C guards
2019-06-25 09:28:21 +01:00
Sebastian Stockhammer 142a223cf9 Fix astyle 2019-06-25 07:51:27 +02:00
Martin Kojtal c9bdcd6b16 cellular: fix file permission 2019-06-24 22:23:10 +01:00
Maciej Bocianski b4138d1102 usb_device-msd test: OS type detection fix 2019-06-24 22:12:20 +02:00
Filip Jagodzinski 8d8383b23c Tests: SleepManager: Fix test_check for NRF5X
Add missing `lp_ticker_clear_interrupt()` in the interrput handler used
in `test_lock_unlock_test_check()` test.
Remove redefined `us_to_ticks()`.
2019-06-24 18:24:01 +02:00
Martin Kojtal 979f26f74d
Merge pull request #10875 from mirelachirica/revert_ipv6_bg96
Cellular: Remove IPV6 and IPV4V6 as supported properties for BG96
2019-06-24 14:55:50 +01:00
Devaraj Ranganna cb8f2c07a1 1. Include MBEDTLS_CONFIG_FILE before evaluating MBEDTLS_PSA_CRYPTO_C
2. Remove macro MBEDTLS_PSA_CRYPTO_C from PSA targets

Signed-off-by: Devaraj Ranganna <devaraj.ranganna@arm.com>
2019-06-24 14:33:04 +01:00