Commit Graph

279 Commits (0758d23f003126ee1194c4b430c7fd78df13fd8d)

Author SHA1 Message Date
Anna Bridge 2af2b1b18b
Merge pull request #11190 from jarvte/fix_wise1570_netsocket_tests
Cellular: failure when deleting created context is not considered error
2019-08-15 12:58:32 +01:00
Teppo Järvelin 3c1bf0a9e2 Cellular: moved string_to_pdp_type from AT_CellularContext to CellularUtil
string_to_pdp_type is a common method for AT and other layers.
Without moving there will be duplicate methods.
2019-08-12 10:27:57 +03:00
Teppo Järvelin 10251ab3b2 Cellular: failure when deleting created context is not considered as an error
If delete fails there is nothing we or application can do. There is no point
returning an error for this. This affects to AT_CellularContext::disconnect
not returning an error if context delete fails.
2019-08-09 12:27:25 +03:00
Seppo Takalo 7d7416558a
Merge pull request #11073 from ARMmbed/feature-public-headers
Feature public headers
2019-08-07 16:04:45 +03:00
Ari Parkkila e1124668db Cellular: Add DNS servers from PDP contexts to nsapi_dns 2019-08-05 21:53:24 -07:00
George Psimenos 3b23edb78c Fix CI for branch feature-public-headers (#11093)
* Fix rtos include path in NRFCordioHCIDriver
* Flatten USB driver directory structure
* Add missing include for us_ticker
* Add more missing includes for us_ticker
* Fix mbed_hal_fpga_ci_test_shield/uart test
* Fix bare-metal build
* Fix Watchdog UNITTEST
* Fix Mbed OS 2 build for Public/Internal headers relocating
2019-08-02 12:32:40 +01:00
Hugues Kamba 20f81e19be Change Doxygen groups structure, splitting first by Public/Internal (#11105)
* Change Doxygen groups structure, splitting first by Public/Internal

This commit also does the following:
* groups the documentation of related API
* moves `events/internal/equeue.h` to `events/equeue.h`
* merges `events/source/README.md` to `events/README.md`
2019-08-02 12:23:47 +01:00
Hugues Kamba bfa1b4dd84 Drivers/Events/RTOS Public and internal APIs cleanup (#10955)
Separate drivers, events, and rtos internal APIs from public APIs.

* Move source files to source subdirs
* Move internal headers to internal subdirs
* Add Doxygen comments for documenting internal and public APIs
* Remove source code from header files in order to remove include pre-processor directives
that included header files not directly used by said header files
* Explicitly include header files instead of implicit inclusions via third-party header files.

Release Notes

This will break user code that was using an internal API as the internal header files have been moved.
This will only break if the user was including the header file using a namespace (i.e #include "foo/bar.h" instead of #include "bar.h"
2019-08-02 12:23:47 +01:00
Kimmo Vaisanen 882c21bf0b Fix MBED_ASSERT for UTs
For UTs mbed_assert_internal should not be declared as MBED_NORETURN
as UT stub for mbed_assert_internal only prints out the assert trace
and returns back to original code.
2019-07-31 15:06:28 +03:00
Kevin Bracey 852a626399 Add mstd_xxx headers to unit tests
Stripped down headers that route through to `std` forms more - eg
no local implementation of `atomic` or `mutex`.
2019-07-18 20:02:07 +03:00
Kevin Bracey fc8e8f67c6 Deprecate wait/wait_ms APIs 2019-07-15 10:13:50 +03:00
Kevin Bracey 83b329cb71 RTOS API for bare metal
Provide partial RTOS API for bare metal builds - things that
can be done in a single threaded environment.

Allows more code to work in both RTOS and bare metal builds without
change, and in particular gives easy access to the ability to
efficiently wait for something occurring in interrupt.

Available in bare-metal:
* ThisThread
* osThreadFlagsSet to set flags on main thread (can be set from IRQ)
* EventFlags (can be set from IRQ)
* Semaphores (can be released from IRQ)
* Mutex (dummy implementation)

Not useful:
* ConditionVariable (could only be signalled from 2nd thread)
* RtosTimer (calls in a second thread context)
* Thread

Unimplemented:
* Mail, Queue, MemoryPool

Possible future work:
* ConditionVariableCS to act as IRQ signalled ConditionVariable
2019-07-15 10:13:50 +03:00
Kevin Bracey 607856ee9a Set unit tests to C++14
Adjust some non-C++11-compatible code that failed as a result.
2019-07-09 19:08:57 +03:00
Martin Kojtal 7059221817
Merge pull request #10925 from AnttiKauppila/buff_size_fix
Doubled ATHandler's BUFF_SIZE
2019-07-03 11:48:02 +01:00
Martin Kojtal ccb63d771e
Merge pull request #10857 from ARMmbed/feature-watchdog
Add Watchdog and ResetReason
2019-07-03 11:43:52 +01:00
Martin Kojtal 25fbd3956b Watchdog: remove VirtualWatchdog
We will provide documentation how to create your own VirtualWatchdog. It's simple,
create timeout and watchdog objects.

This class brought lot of discussion and questions. After our refactor we made this class
just a linked list of objects - something tickers can do as well (they already have linked list) and handling hw should be
done via Watchdog due to the limitations (timeout can be set only once per app!).
2019-07-02 12:46:23 +01:00
Filip Jagodzinski 968e270b0b Watchdog: Fix unittests
Compare get_timeout against the last timeout successfully set.
Merge most of the test cases into one. Do not rely on the tests
execution order.
Fix the watchdog_api_stub to keep timeout value set by init function.
2019-07-02 12:46:23 +01:00
Martin Kojtal fd445a57cb Watchdog: remove config value for timeout, set it dynamically
Use start method to set timeout
2019-07-02 12:46:23 +01:00
Martin Kojtal 89c0ab793e VirtualWatchdog: process fail test expects 0 as reset - no ticker running 2019-07-02 12:46:23 +01:00
Filip Jagodzinski cc7a3dd677 Fix more unittest errors 2019-07-02 12:46:23 +01:00
Filip Jagodzinski 1c12f9b2b0 Fix unittest errors 2019-07-02 12:46:23 +01:00
Martin Kojtal 529f4a2a7e unittest: add virtualwatchdog stub 2019-07-02 12:46:23 +01:00
Martin Kojtal 33f8b35917 watchdog unittest: fix naming after refactor 2019-07-02 12:46:23 +01:00
Martin Kojtal 8231efc41c unittest: remove platform watchdog (moved to drivers) 2019-07-02 12:46:23 +01:00
Martin Kojtal 4549a22566 unittest: move watchdog files to drivers
Test VirtualWatchdog and Watchdog
2019-07-02 12:46:23 +01:00
Martin Kojtal 8bbba26842 unittest: rename watchdog to VirtualWatchdog 2019-07-02 12:46:23 +01:00
Martin Kojtal 2d77fccb09 Watchdog: update unittests 2019-07-02 12:46:23 +01:00
Antti Kauppila 369e2d53ff Fixed unittests 2019-07-02 10:17:06 +03:00
Martin Kojtal e40a76575f watchdog: fix copyright 2019-06-26 09:43:21 +01:00
Anna Bridge 15b5b5da23
Merge pull request #10694 from jarvte/set_authentication_type
Cellular: add method to set authentication type to CellularContext
2019-06-21 12:19:04 +01:00
Anna Bridge 6000724de6
Merge pull request #10703 from AnttiKauppila/optimisation
Cellular: Removed boilerplate code
2019-06-19 12:06:10 +01:00
Antti Kauppila 1ed338ef28 Valgrind & unittest fixes 2019-06-13 15:15:53 +03:00
Rajkumar Kanagaraj c41d80330e Fixed the unittest case failure 2019-06-03 16:32:14 +02:00
Rajkumar Kanagaraj dfe4b533c3 Update Watchdog
- Changed the process into static method
 - used the singletonptr for creating the low power ticker instance
 - Added the mbed stub into cmake build for cellularnonipsocket,loramacrypto
2019-06-03 15:31:20 +02:00
Rajkumar Kanagaraj f672974c25 Incorporated the Reivew Comments 2019-06-03 15:24:04 +02:00
Rajkumar Kanagaraj 696638afeb Incorporated the Reivew Comments 2019-06-03 15:24:03 +02:00
Rajkumar Kanagaraj f94eb3cf13 Fix for the Ci build issue 2019-06-03 15:24:01 +02:00
Rajkumar Kanagaraj 47030cd23f SW watchdog unittest cases
-Added the mock class function to mock mbed_assert_internal
  -Added the unit test case to test start,kick,stop
  -Modified the interface api name from is_alive to process
  -added the unit test cases for process
2019-06-03 15:23:59 +02:00
Rajkumar Kanagaraj eb98c38226 Hw Watchdog UnitTest cases
-Added the unit test case for testing Hw watchdog
    -Added the supported stubs files
2019-06-03 15:23:59 +02:00
Martin Kojtal 523ad23a30
Merge pull request #10656 from jarvte/fix_cellularctx_destr
Cellular: AT_CellularContext disconnect in non-blocking mode
2019-05-31 12:35:59 +01:00
Antti Kauppila 83d62fbb9c astyle fixes 2019-05-29 20:13:22 +03:00
Antti Kauppila 77e8374058 Cellular: Removed boiler plate code 2019-05-29 16:17:08 +03:00
Teppo Järvelin 8922eeb014 Cellular: add method to set authentication type to CellularContext
Authentication type must be able to set. It was hard coded to CHAP.
Added unit tests for CellularContext to be able to add test for new function.
2019-05-29 09:46:15 +03:00
Kevin Bracey 2fbbd9d2ca Introduce Semaphore::acquire methods
Deprecate wait() in favour of acquire(), try_acquire(),
try_acquire_for() and try_acquire_until().

Brings Semaphore more into line with CMSIS-RTOS 2 (which uses "acquire"),
itself (as it has "release"), and other classes having "try", "try for"
and "try until".

Also steps away from vague "wait" term - the primary operation here is
to acquire the semaphore, and this will of course sleep.
2019-05-28 17:02:06 +03:00
Teppo Järvelin 779fb6defd Cellular: AT_CellularContext disconnect in non-blocking mode
Disconnect was supporting only blocking mode.
2019-05-27 12:23:29 +03:00
Teppo Järvelin d559338b3b Cellular: fix unit test valgrind warnings
Stub files did have some memory leaks and using
unintialized variables.
2019-05-21 14:23:21 +03:00
Martin Kojtal 26aa16ff39
Merge pull request #10557 from jarvte/fix_cellularcontext_init
Cellular: Initialize CellularContext member variables in correct class
2019-05-15 08:48:54 +01:00
Martin Kojtal 3ea1c56124
Merge pull request #10147 from kjbracey-arm/atomic_bitwise
Assembler atomics
2019-05-13 14:18:05 +01:00
Teppo Järvelin e4ee870b2e Cellular: Initialize CellularContext member variables in correct class
CellularContext member variables were initialized in inheriting class.
Now in base class where they should be initialized so that every inheriting
class don't have to init them.
2019-05-10 11:43:48 +03:00
Ari Parkkila 830b4234e9 Cellular: Fix setting of statemachine timeout 2019-05-09 04:42:30 -07:00