Commit Graph

16 Commits (fe983090637c36e489ba663e52eb0da83bb193a2)

Author SHA1 Message Date
Anna Bridge cb53825874
Merge pull request #12282 from mprse/fix_for_issue_12268
Fix for issue #12268 (SerialBase.cpp: fix initialization list)
2020-01-23 11:48:58 +00:00
Przemyslaw Stekiel f4af0516f4 SerialBase.cpp: fix compiler warnings by updating the initialization list 2020-01-20 11:03:51 +01:00
Kevin Bracey d6a48b5124 Turn NULLs into nullptr
Avoids overload problems with Callback(nullptr) versus Callback(fnptr).
2020-01-09 14:52:54 +02:00
Przemyslaw Stekiel b6c25b1421 Remove serial flow control functions from image if flow control is not used 2019-12-09 08:28:14 +01:00
Przemyslaw Stekiel 160342b2d0 static pin-map - patch for SerialBase class
Related PR:

https://github.com/ARMmbed/mbed-os/pull/10924

The above PR adds functions to disable/enable serial input/output. If both serial input and serial output are disabled, the peripheral is freed. If either serial input or serial output is re-enabled, the peripheral is reinitialized.

I missed this change while working on the static pinmap and unfortunately it has an impact on it. The reinitialization is a problem for static pinmap. Now the HAL init()/init_direct() function is called not only in the constructor (but also when re-enabling the peripheral). In the current version, even if static pinmap constructor was used to create an object (and init_direct() HAL API), when reinitialization is done it uses init() HAL API. This must be split.

If static pinmap constructor is used, then the peripheral must be always initialized using HAL init_direct() function. If regular the constructor is used, then the peripheral must be initialized using HAL init() function. The same split also must be done while setting flow control during reinitialization.
2019-12-09 08:28:13 +01:00
Przemyslaw Stekiel b2dad08387 Change explicit pinmap to static pinmap 2019-11-28 08:32:12 +01:00
Przemyslaw Stekiel bef6854a47 Serial, SerialBase, UARTSerial: Add explicit pinmap support 2019-11-28 08:32:00 +01:00
Janne Kiiskila 916b91f13e SerialBase.h|cpp [-Wreorder] compiler warning fix
This fixes:

```
[Warning] SerialBase.h@351,22: 'mbed::SerialBase::_flow2' will be initialized after [-Wreorder]
[Warning] SerialBase.h@343,22:   'bool mbed::SerialBase::_rx_enabled' [-Wreorder]
[Warning] SerialBase.cpp@26,1:   when initialized here [-Wreorder]

```

by using C++11 style initializer for SerialBase

Kudos to Kevin Bracey, as her his suggestion - we can drop the initializer
list if we just set the values directly in the SerialBase.h. No need to
worry about the "right order" after that.
2019-11-08 11:20:47 +02:00
Sebastian Stockhammer 1c907e6db9 Update deep sleep locks according to enabled state 2019-10-24 12:53:52 +02:00
Sebastian Stockhammer e72468c037 Handle undefined DEVICE_SERIAL_FC 2019-10-24 10:24:36 +02:00
Sebastian Stockhammer 9e97037316 Fix astyle 2019-10-24 10:24:35 +02:00
Sebastian Stockhammer 31babca1da Retain flow control state 2019-10-24 10:24:35 +02:00
Sebastian Stockhammer aa2969f999 Public SerialBase::enable_input 2019-10-24 10:24:35 +02:00
Sebastian Stockhammer 0a395b6833 Fix astyle 2019-10-24 10:24:35 +02:00
Sebastian Stockhammer e218b5dc19 Free serial resources if not needed anymore 2019-10-24 10:24:35 +02: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