Commit Graph

485 Commits (d30dba29ec26f47270f3635c9d0ecd2d7b206ec7)

Author SHA1 Message Date
Martino Facchin 2b226bfdd8 Use unique include for Stream.h 2019-08-08 14:32:09 +02:00
Hugues Kamba df85e8e233 Mark Ethernet.h methods as Deprecated in Doxygen documentation (#11146) 2019-08-02 12:32:40 +01:00
Hugues Kamba f0f408b2d8 Upstream PR #11073 review request changes (#11135)
* Modify Doxygen grouping of `drivers` Public/Internal APIs
* Correct classification of `mbed_events.h`
* Amend name of Doxygen group containing Device Key API
* Classify `CallChain.h` as public API and relocate file
* Remove Doxygen group from `equeue_platform.h` as it has no Doxygen compliant documentation
* Move USB target specific code back to `usb/device/targets`
2019-08-02 12:32:40 +01: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
George Psimenos df5baf6031 USB public APIs cleanup (#11034)
The contents of the usb directory were moved to appropriate locations and the usb directory removed.

* Public USB headers moved under drivers/
* Internal USB headers moved under drivers/internal/
* USB Source code moved under drivers/source/usb/
* Moved usb/device/hal/ under hal/usb/
* Moved usb/device/USBPhy/ under hal/usb/
* Merged usb/device/targets/ into targets/
* Separated public and private USB API documentation under Doxygen groups drivers-public-api and drivers-internal-api.
2019-08-02 12:23:47 +01:00
Hugues Kamba 83354e46a7 Platform: Separate internal APIs from public APIs
Also includes:
* rename `mbed_sleep_manager.c` to `mbed_power_mgmt.c` to match its
  header file
* create Doxygen groups for public and internal APIs
* use relative path to include header files where inconsistent
* update references to internal APIs throughout libraries
* update the copyright year for all modified files
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
Kevin Bracey 0bb4c050b7 SingletonPtr: API extensions, make constexpr
* Adjust definition to make the default constructor `constexpr`.
  This permits use in classes that want lazy initialization and their
  own `constexpr` constructor, such as `mstd::mutex`.

* Add `get_no_init()` method to allow an explicit optimisation for
  paths that know they won be the first call (such as
  `mstd::mutex::unlock`).

* Add `destroy()` method to permit destruction of the contained object.
  (`SingletonPtr`'s destructor does not call its destructor - a cheat
  to omit destructors of static objects). Needed if using in a class
  that needs proper destruction.
2019-07-18 20:02:04 +03:00
Kevin Bracey fc8e8f67c6 Deprecate wait/wait_ms APIs 2019-07-15 10:13:50 +03:00
Filip Jagodzinski 0f3f38e512 Watchdog: Fix astyle in doxy 2019-07-04 10:49:24 +02:00
Amanda Butler ec53d1d9c8
Edit Watchdog.h
Edit file to address comments and for consistent tense and voice.
2019-07-03 17:43:51 -05:00
Filip Jagodzinski 6f8266c02f Watchdog: Clean up the doxygen comments 2019-07-03 15:28:37 +02:00
Martin Kojtal ccb63d771e
Merge pull request #10857 from ARMmbed/feature-watchdog
Add Watchdog and ResetReason
2019-07-03 11:43:52 +01:00
mjm2017 c6fbcb4efe
Update AnalogOut.h 2019-07-03 06:51:04 +02:00
Martin Kojtal e12125bb25 Watchdog: start without arg uses max timeout from a target 2019-07-02 12:46:23 +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
Martin Kojtal dc4d4a32f4 VirtualWatchdog: use timeout in ctor to set hw timeout
No config, neither additional parameter - the first instance of the class initalizes the peripheral.
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 6313e530b3 VirtualWatchdog: provide hw timeout via ctor 2019-07-02 12:46:23 +01:00
Martin Kojtal 7b341847c4 VirtualWatchdog: add comment about exclusive access to Watchdog 2019-07-02 12:46:23 +01:00
Martin Kojtal 29842f98a0 VirtualWatchdog: fix doxygen ingroup and ctor 2019-07-02 12:46:23 +01:00
Martin Kojtal dc2e8ab35e Watchdog: add docs update about intention one vs multiple Watchdogs
VirtualWatchdog - multiple timers in the system - most used watchdog
Watchdog - simple driver for one system timer in the app - bootloader or similar
2019-07-02 12:46:23 +01:00
Filip Jagodzinski a810ef807f Watchdog: Fix timeout constraints
Update the start method to check 0 < timeout <= max_timeout.
2019-07-02 12:46:23 +01:00
Filip Jagodzinski cc7a3dd677 Fix more unittest errors 2019-07-02 12:46:23 +01:00
Martin Kojtal ff0652830a Watchdog: fix space in code example 2019-07-02 12:46:23 +01:00
Martin Kojtal 188655f929 Watchdog: example code - add kick() 2019-07-02 12:46:23 +01:00
Martin Kojtal 6b26b23d7b virtualWatchdog: fix alignment for tickers and one space 2019-07-02 12:46:23 +01:00
Martin Kojtal 72582b0622 virtualWatchdog: fix alignment for tickers 2019-07-02 12:46:23 +01:00
Martin Kojtal 2c6357b098 VirtualWatchdog: fix missing kick and init check in process
Also syntax error for ticker definitions.
2019-07-02 12:46:23 +01:00
Martin Kojtal bb473d916e Watchdog: keep it simple - providing simple driver functionality
No callbacks or tickers. User is handling kick() method directly based on timeout set.
VirtualWatchdog manages ticker and callback.
2019-07-02 12:46:23 +01:00
Martin Kojtal 28398e6254 Watchdog: fix include paths - use module name 2019-07-02 12:46:23 +01:00
Martin Kojtal a63a54680c VirtualWatchdog: fix default timeout value (1ms is unreal) 2019-07-02 12:46:23 +01:00
Martin Kojtal 88a9548167 VirtualWatchdog: fix name for member timeout 2019-07-02 12:46:23 +01:00
Martin Kojtal a18ba70c1b VirtualWatchdog: fix is hw init definition 2019-07-02 12:46:23 +01:00
Martin Kojtal 61f859b514 VirtualWatchdog: add config option to ctor to clarify the hw timeout 2019-07-02 12:46:23 +01:00
Martin Kojtal 9f48f26876 Watchdog: fix timeout - use full range for watchdog 2019-07-02 12:46:23 +01:00
Martin Kojtal b822c09b3b Watchdog: fix callback - uses ms 2019-07-02 12:46:23 +01:00
Martin Kojtal 0519caebe1 VirtualWatchdog: fix doxygen docs errors 2019-07-02 12:46:23 +01:00
Martin Kojtal 581bf208ad Watchdog: refactor timeout handling
Enable kicking directly by kick() and handle timeout by using private handler.
2019-07-02 12:46:23 +01:00
Martin Kojtal 0aa095b944 Watchdog: add missing docs doxygen 2019-07-02 12:46:23 +01:00
Martin Kojtal f7ccd06685 Watchdog: remove dead reference file 2019-07-02 12:46:23 +01:00
Martin Kojtal 1c0f1880eb VirtualWatchdog: fix error code and timeout 2019-07-02 12:46:23 +01:00
Martin Kojtal 02936376ae Watchdog: fix const static
Fixing error "non-static data member initializers only available with -std=c++11 or -std=gnu++11"
2019-07-02 12:46:23 +01:00
Filip Jagodzinski 455015daf5 Watchdog & VirtualWatchdog process() update
Add uint32 argument - pass how much time already passed to the callback.
2019-07-02 12:46:23 +01:00
Martin Kojtal 701d8f7cef VirtualWatchdog: make sure we are the only owner of watchdog
If virtual one is not the only owner we error - init error code in driver.
2019-07-02 12:46:23 +01:00
Martin Kojtal a3599414e1 Watchdog: clean-up start 2019-07-02 12:46:23 +01:00
Martin Kojtal b166acd1cb watchdog: fix astyle errors 2019-07-02 12:46:23 +01:00
Martin Kojtal f98c2fdbba watchdog: remove manager
Watchdog can handle callbacks - VirtualManager can attach to the tick. This should simplify the logic.

Watchdog can tick on its own using tickers.
VirtualWatchdog uses attach to get a callback when Watchdog ticks - to process own
linked list of virtual watchdogs.
2019-07-02 12:46:23 +01:00
Martin Kojtal 698b0eda8a watchdog: add WatchdogManager
Watchdog should be usable on it's own - kicking it via ticker. No Virtual involved.
VirtualWatchdog as well - services should use this one to have multiple one in the system.

There's WatchdogManager - basically internal class to manage ticker for Watchdog.
2019-07-02 12:46:23 +01:00
Martin Kojtal a668454de4 Watchdog: fix dtor 2019-07-02 12:46:23 +01:00
Martin Kojtal bb1cc32a25 Watchdog: kick method should not have any external dep 2019-07-02 12:46:23 +01:00
Martin Kojtal 91679d40d5 Watchdog: cleanup after singleton usage 2019-07-02 12:46:23 +01:00
Martin Kojtal d9e12e4168 VirtualWatchdog: fix protection macro 2019-07-02 12:46:23 +01:00
Martin Kojtal 7da2c6dbb6 Watchdog: use get_instance to access watchdog hw 2019-07-02 12:46:23 +01:00
Martin Kojtal edd857ea9c VirtualWatchdog: software watchdog
Refactor old Watchdog (it was not a driver) to become VirtualWatchdog.
This is software virtual watchdog. This it the primary used watchdog in user application.

VirtualWatchdog: has-a watchdog. Initializes hw watchdog - start it when first used, stops it when there is no more VirtualWatchdog in the system -
list is empty.

Adding also check to watchdog to make sure there is only one in the system - runtime error if multiple objects created to already
running hw watchdog.
2019-07-02 12:46:23 +01:00
Martin Kojtal 7b0915c7d4 Watchdog: refactor driver
Watchdog is hardware driver. It interacts with HAL - provides wrapper to interact with the peripheral.

Provides basic functionality: start/stop, get timeout/max timeout.
It is automatically kicked by a timer, according to the timeout set in ctor.
2019-07-02 12:46:23 +01: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
Amanda Butler c497010a56 Edit ResetReason.h
Edit file for active voice, complete sentences and grammar.
2019-06-27 09:45:32 +01:00
Amanda Butler f8a6674afd Edit Watchdog.h
Edit file, mostly for active voice, consistent abbreviations, grammar and spelling.
2019-06-27 09:28:05 +01:00
Filip Jagodzinski e2ba0bb533 ResetReason: Update the header file
Minor doxygen fixes.
2019-06-26 09:58:24 +01:00
Martin Kojtal e40a76575f watchdog: fix copyright 2019-06-26 09:43:21 +01:00
Amanda Butler 13f1217a0a
Edit MbedCRC.h
Review changes, and edit file while I'm at it.
2019-06-17 08:20:55 -05:00
Bartek Szatkowski fda4988c05 Extend MbedCRC class doxygen to add more operational details 2019-06-17 12:14:27 +01:00
Bartek Szatkowski 9e2b516bca Fix doxygen for MbedCRC 2019-06-17 10:21:33 +01: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 696638afeb Incorporated the Reivew Comments 2019-06-03 15:24:03 +02:00
Rajkumar Kanagaraj 3c0cd62476 fix for spell check and header file 2019-06-03 15:24:01 +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 bcea865db2 Add SW Watchdog
-SW watchdog has interface name start(),stop(),kick()	Sw watchdog internally has static list and shared across multiple instance of SW watchdog
	- Sw watchdog initialize timeout value,unique string via constructor whenever threads created sw watchdog object
	-Threads make sure pass proper timeout value,Unique string while creating the instance.
	-start() called by components(BLE,WIFI etc.,),it adds the entry into static list with few details current count ,etc.,
	-kick() called by registered components(BLE,WIFI etc.) to reset current count to zero.
        -is_alive - interface API to mbed_watchdog_manager
        -implementation optimization
2019-06-03 15:23:57 +02:00
Rajkumar Kanagaraj 3cd52d4732 Watchdog refactoring to multithreaded thread.
-Added API to register muliple threads to watchdog drivers
-Watchdog timeout reconfigures everytime whenever new register thread with longer timeout period
-New APIs for watchdog
 wd_register(const osThreadId_t tid, const uint32_t timeout) to register to watchdog
 wd_unregister(const osThreadId_t tid) to unregister to watchdog
 kick(const osThreadId_t tid) to refresh the watchdog
2019-06-03 15:23:56 +02:00
George Psimenos f82b7d8229 Improve type cast 2019-05-31 13:59:40 +01:00
George Psimenos 9f66347bd3 Make buffer parameter const 2019-05-28 15:58:19 +01:00
Rajkumar Kanagaraj 95e8e27e9b doxy spell check fix for watchdog 2019-05-24 12:28:23 +02:00
Donatien Garnier 91ef36809f Apply new astyle config style 2019-05-24 12:23:36 +02:00
Donatien Garnier 3ab0fbc7cf Update license headers 2019-05-24 12:23:35 +02:00
Steven Cartmell e7761a1d39 Move watchdog parameter validation into the driver layer 2019-05-24 11:35:22 +02:00
Steven Cartmell 7c392a16d4 Remove window and sleep mode options for watchdog API 2019-05-24 11:35:13 +02:00
Steven Cartmell 8fa38bb25b Add Watchdog driver API 2019-05-24 11:20:26 +02:00
Steven Cartmell 3c18dcb882 Amend reset reason driver API
- Change API to match C++ API throughout drivers
- Amend HAL API documentation to be more specific
2019-05-24 11:20:26 +02:00
Steven Cartmell 366893ae71 Add independent watchdog reference implementation for STM32 2019-05-24 11:20:25 +02:00
Martin Kojtal 64575fe586
Merge pull request #10480 from kjbracey-arm/spi_prime
SPI: Prime asynch transaction buffer on construction
2019-05-14 09:28:41 +01:00
Kevin Bracey 3fbad10337 SPI: Prime asynch transaction buffer on construction
SPI peripherals' asynch transaction buffers are now wrapped by
SingletonPtr, which needs to take the singleton_lock Mutex when first
accessed. If it was first accessed by an asynch transaction started from
IRQ, that would not be possible.

Add a SingletonPtr::get() call to the SPI construction process so that
the peripheral's buffer is fully constructed before any SPI methods can
be called, meaning asynch methods won't fail from IRQ.

(Other pre-existing synchronisation issues with async remain, but this
avoids a new trap in Mbed OS 5.12).
2019-04-25 17:19:01 +03:00
Martin Kojtal 8c696076fc
Merge pull request #10408 from sg-/docs-businout
Update comments and improve readability for the BusInOut class
2019-04-18 18:00:07 +01:00
Amanda Butler 04552a1409
Fix typos in BusInOut.h
Fix typos.
2019-04-17 15:12:19 -05:00
Martin Kojtal 14b9229b13
Merge pull request #10415 from 0xc0170/fix_licenses
rtos/drivers: add license information
2019-04-17 12:26:43 +01:00
Martin Kojtal 5a96f45ce0 license: fix files list 2019-04-16 11:43:14 +01:00
Martin Kojtal 5f985f56dc drivers: add license information 2019-04-16 11:29:14 +01:00
samgrove d88f2d9eed Update comments and improve readability for the BusInOut class 2019-04-15 14:58:24 -05:00
Kevin Bracey 380b27e741 Fix UARTSerial emergency unbuffered write
The length calculation in UARTSerial::write_unbuffered was wrong,
meaning it would truncate output data to half length.

This would show up if `platform.stdio-buffered-serial` was configured to
true, `platform.stdio-convert-newlines` was still false - `mbed_error`
crashes would be garbled.

This wasn't usually spotted because applications generally have both
settings false or both true, and if newline conversion is on, then
`mbed_error_puts` writes 1 character at a time to FileHandle::write,
avoiding the length error.
2019-04-09 16:15:09 +03:00
Cruz Monrreal d2c9d9ddc8
Merge pull request #9111 from embeddedteam103/can_signness_mismatch
CAN: Fix signness mismatch in `CANMessage` constructors
2019-04-01 17:06:09 -05:00
Cruz Monrreal ab22ab8ce3
Merge pull request #10150 from kjbracey-arm/timer_sleepcheck
Timer: remove hard-coded lp_ticker knowledge
2019-03-28 17:09:36 -05:00
Cruz Monrreal d7bec657ef
Merge pull request #10043 from ithinuel/add_vprintf_to_rawserial
add vprintf to Rawserial.
2019-03-28 17:09:29 -05:00
Cruz Monrreal d3db0a8c2d
Merge pull request #9476 from lrusinowicz/asynch_serial_api
Asynchronous Serial API fixes and refactoring
2019-03-28 17:09:22 -05:00
CoolUsername 6f3ad9a93b CR: Add signed overload 2019-03-26 16:11:50 +02:00
Ryan Morse 51a47139f3 Fixed issue with PWM not being freed when the object is destroyed 2019-03-21 07:48:42 -07:00
Kevin Bracey 534a3d2333 Timer: remove hard-coded lp_ticker knowledge
The knowledge that lp_ticker runs in deep sleep was hard-coded with a
comparison check of a ticker_data_t pointer against get_lp_ticker_data.

Remove this hard-coded check, which adds a linker dependency against
the low power ticker even if not being used - put a flag into the
ticker_interface_t.

A future extension might be to move this flag into the ticker_info_t
provided by the HAL, but for the moment keep the assumption that
lp_ticker does run, us_ticker doesn't.
2019-03-20 10:18:49 +02:00
Wilfried Chauveau 8b605069f7
add vprintf to Rawserial. 2019-03-15 07:07:16 +00:00
Martin Kojtal 7c9a71846e
Merge pull request #9469 from kjbracey-arm/spi_muxing
SPI upgrade - per-peripheral mutex and GPIO-based SSEL
2019-03-01 18:38:27 +01:00
Kevin Bracey b12be6bb80 Rename SPI_COUNT to DEVICE_SPI_COUNT
Avoid collision with some HALs that already define SPI_COUNT.
2019-03-01 14:37:04 +02:00
Kevin Bracey df7e3367f7 Cope with HALs not defining SPIName 2019-03-01 14:33:34 +02:00
Kevin Bracey 5e059b7d1d SPI upgrade - per-peripheral mutex and GPIO-based SSEL
This commit takes some of the work done on the SPI class from #8445, and
refines it, to provide the per-peripheral mutex functionality.

This also implements GPIO-based SSEL, which exposes a new
select()/deselect() API for users to group transfers, and should work on
every platform (unlike the HAL-based SSEL). This requires users to use a
new constructor to avoid backwards compatibility issues.

To activate the per-peripheral mutex, the HAL must define SPI_COUNT and
provide spi_get_peripheral_name().  (In #8445 this is a reworked
spi_get_module, but the name is changed here to avoid a collision with
existing HALs - this commit is designed to work without wider HAL
changes).

Fixes: #9149
2019-03-01 14:33:33 +02:00
Kevin Bracey 649856f3ff Implement enable calls in UARTSerial
Implement enable calls so that reception can be shut down to save
power without closing the device.
2019-02-22 11:01:01 +02:00
Leszek Rusinowicz 8586528ff6 Asynchronous Serial API fixes and refactoring, part 3
Updated API documentation to better explain API operation and to explicitly
point out that any event ends the operation.
2019-02-12 17:13:02 +01:00
Leszek Rusinowicz cbb84d8ad3 Asynchronous Serial API fixes and refactoring, part 2
Aborting of asynchronous operation is necessarily hazardous, as
operation can end in interrupt anywhere from the point of decision
until it is actually aborted down the abort_...() method.
Proper deep sleep unlocking requires then use of the critical
section and should be contained completely within API implementation.
2019-02-12 17:09:48 +01:00
Leszek Rusinowicz 6d648092e1 Asynchronous Serial API fixes and refactoring, part 1
1. As RX and TX flows are separate on Serial device, read and write
   functionalities should be completely separate, including any deep
   sleep locking etc.
2. User may want to use asynchronous API without a callback (especially
   for write operations), for example in a command-response scheme
   end of write operation is usually meaningless. The intuitive
   method is to submit NULL pointer for a callback. For this reason
   depending on the _callback field in determining whether the
   operation is in progress seems to be uncertain, so introduced
   additional flags for this purpose.
2019-02-12 17:04:19 +01:00
David Saada 48a3ae9636 FlashIAP driver: Add retries to erase and program operations.
Few boards may fail the write actions due to HW limitations (like critical
drivers that disable flash operations). Just retry a few times until success.
In addition, remove the redundant retries in NVStore (not needed now).
2019-01-30 16:05:27 +02:00
Przemyslaw Stekiel af02b23bf7 Fix for Issue #7308 (Deep_sleep_lock Ticker.h Issue) 2019-01-24 08:22:24 +01:00
kegilbert 70b9b753db Add doxygen spellcheck jobs to Travis
Currently tests
    - drivers
    - platform
    - rtos
    - events
    - features/netsocket
2019-01-11 10:22:15 -06:00
Martin Kojtal ab1c2be997
Merge pull request #8957 from InfernoEmbedded/fix-8913
Fix incorrect #ifdefs on DEVICE_FOO macros
2018-12-20 10:52:06 +00:00
Alastair D'Silva 2617c5d55b Don't use define checks on DEVICE_FOO macros (mbed code)
The DEVICE_FOO macros are always defined (either 0 or 1).

This patch replaces any instances of a define check on a DEVICE_FOO
macro with value test instead.

Signed-off-by: Alastair D'Silva <alastair@d-silva.org>
2018-12-20 10:16:42 +11:00
Alastair D'Silva 24dbfb6b09 Remove #ifdefs for DEVICE_SERIAL & friends
DEVICE_SERIAL is always defined (either 0 or 1).
Remove the faulty checks introduces in commit
26b9a1f6a3 and replace them with
value checks as originally implemented.

Fixes #8913

Signed-off-by: Alastair D'Silva <alastair@d-silva.org>
2018-12-20 09:42:02 +11:00
David Saada f3bac3451c Fix FLASHIAP_ROM_END macro for GCC_ARM & IAR toolchains
- Consider data section in GCC_ARM toolchain
- Consider init_array section in IAR toolchain
- Rename macro to FLASHIAP_APP_ROM_END_ADDR for clarity sake
2018-12-19 12:05:08 +02:00
embeddedteam103 0210cefa9e Add unsigned everywhere in the driver for
compatibility with the CAN HAL
2018-12-17 16:49:17 +02:00
Martin Kojtal aec8bb6046 drivers: add spdx license 2018-11-28 10:39:50 +00:00
Russ Butler caa7b93921 Rename lock functions and classes
Invert the name of the lock functions and classes so you are not
locking a negative.
2018-11-27 09:29:32 +00:00
Russ Butler 58ed5c2f7d Change MPU lock name for readability in FlashIAP
Change the variable names in FlashIAP from
'xn' to 'make_ram_executable' and from 'wn' to 'make_rom_writable' to
make the code more readable.
2018-11-27 09:29:32 +00:00
Russ Butler 1821d37621 Overhaul MPU for new requirements
Make the following changes:
-Allow a vector specific ARM MPU driver by defining MBED_MPU_CUSTOM
-Allow ROM address to be configured for ARMv7-M devices by
    setting the define MBED_MPU_ROM_END
-Add ROM write protection
    -Add new functions and lock
    -enable at boot
    -disable during flash programming
2018-11-27 09:29:32 +00:00
Russ Butler d27566c955 Rename MpuXnLock
Rename MpuXnLock  to ScopedMpuXnLock so it has the same naming
convention as ScopedMutexLock. Also make this class inherit from
NonCopyable to prevent misuse.
2018-11-27 09:29:32 +00:00
Russ Butler c0ff98614a Disable the MPU when flashing
When programming flash using the FlashIAP API allow execution from
ram. Many devices require flashing to be done from RAM.

Also allow execution from ram when running the low level flash tests.
2018-11-27 09:29:31 +00:00
Martin Kojtal 9aef9d3661
Merge pull request #8671 from mray19027/uart_break
Feature: Add non-blocking serial break/unbreak functions
2018-11-19 13:14:55 +00:00
Martin Kojtal fbdbffffb9 drivers: fix coding style for doxygen 2018-11-15 07:20:11 +00:00
Michael Ray b7559e315c Feature: Added non-blocking serial break/unbreak functions
Current serial implementation has a send_break() command which
sends a break command on the UART for a fixed amount of time.

Added functions to allow users to send a break in a non-blocking
fashion, as well as for a user-specified amount of time.
2018-11-13 12:46:05 -06:00
Deepika a21a4224c5 Docs update in platform folder
1. Remove protected member functions and protected attributes from rendering
   on docs site
2. Update BusInOut doxygen
2018-11-08 17:31:11 -06:00
David Saada 542744d03c Support erase value in Flash HAL drivers, FlashIAP and block devices 2018-11-07 14:23:07 +02:00
Cruz Monrreal 5549c52da2
Merge pull request #8606 from pea-pod/fix-bus-oboe
Fix off-by-one-error in BusIn/Out
2018-11-06 13:43:27 -06:00
William Kelly III 74f72597a8 Fix off-by-one-error in BusIn/Out 2018-10-31 12:28:53 -05:00
Kevin Bracey 3da44f67ce Add format checking to RawSerial::printf 2018-10-31 15:36:32 +02:00
kegilbert e8e9076662 Fix typos in Drivers doxygen 2018-10-30 15:04:54 -05:00
Russ Butler 3b970c179f Move #endif to fix PwmOut.h doxygen
Move the #endif up so it does not include the closing bracket of
PwmOut. This allows the doxygen for PwmOut, classmbed_1_1_pwm_out.html,
to build.
2018-10-29 10:52:30 -05:00
Cruz Monrreal II b364dcb48e Merge branch 'doc-fix-spi' of ssh://github.com/paul-szczepanek-arm/mbed-os into rollup 2018-10-26 11:43:01 -05:00
Mel W fae81b698b
One more missing period. 2018-10-26 10:45:38 +03:00
Mel W 782251a089
Adding periods 2018-10-26 10:45:05 +03:00
Cruz Monrreal II ec9404a32e Merge branch 'fix_doxygen_MBedCRC' of ssh://github.com/maciejbocianski/mbed-os into rollup 2018-10-25 21:49:45 -05:00
Christopher Haster fa09fff283 Fix interleaved ifdefs with DEVICE_SPI_ASYNCH + DOXYGEN_ONLY 2018-10-25 11:33:17 -05:00
Paul Szczepanek 889a98e4f5
Update SPI.h 2018-10-25 11:34:30 +01:00
Martin Kojtal e9f98906d7 crc: fix crc mode coding style 2018-10-25 09:58:17 +01:00
paul-szczepanek-arm efdcdd5450 active voice 2018-10-24 09:56:53 +01:00
paul-szczepanek-arm d4b6fdc1ec SPI capitalisation 2018-10-24 09:26:10 +01:00
paul-szczepanek-arm 68628c1178 fix syntax err from misplaced ifdef 2018-10-24 08:49:07 +01:00
Maciej Bocianski 394df128fb MbedCRC doxygen fix 2018-10-24 09:33:37 +02:00
Cruz Monrreal II 0e2983e539 Merge branch 'doc-fix-i2c_slave' of ssh://github.com/paul-szczepanek-arm/mbed-os into rollup 2018-10-23 22:38:33 -05:00
Cruz Monrreal II 2274fc8bc1 Merge branch 'doc-fix-spi_slave' of ssh://github.com/paul-szczepanek-arm/mbed-os into rollup 2018-10-23 22:38:32 -05:00
paul-szczepanek-arm 263f067da4 imperative 2018-10-23 17:32:03 +01:00
paul-szczepanek-arm 482f2b6d07 spi doxygen fixes 2018-10-23 17:26:38 +01:00
Amanda Butler 7637c61d9d
Edit SPISlave.h
Make minor edits to existing text.
2018-10-23 09:20:22 -05:00
Amanda Butler 7fa3a44cc3
Copy edit I2CSlave.h
Make minor copy edits.
2018-10-23 09:13:52 -05:00
paul-szczepanek-arm f9ae6a37b1 hide protected 2018-10-23 14:49:37 +01:00
paul-szczepanek-arm 68929ce94b doxygen cleanup 2018-10-23 14:47:25 +01:00