Commit Graph

35 Commits (decd7d01676a41401cadda43b4776874255aba9c)

Author SHA1 Message Date
Anna Bridge 891805b42e
Merge pull request #14662 from AGlass0fMilk/can-message-comparison-operators
Add CANMessage deep comparison operators
2021-05-25 14:05:03 +01:00
Sebastian Stockhammer 77b5ffc2f6 Remove shadowing member variables
- The variables shadow SerialBase::_tx_enabled and SerialBase::_rx_enabled
- Update interrupts when input/output is enabled to avoid infinite congestion
- Update comments
2021-05-19 09:01:06 +02:00
George Beckstein b9f2367271 Add CANMessage deep comparison operators 2021-05-18 08:33:22 -04:00
Martin Kojtal c02e101e9f
Merge pull request #14336 from AGlass0fMilk/polymorphic-can
Implement polymorphism for CAN driver
2021-05-12 10:17:28 +02:00
George Beckstein d39a4168ec Replace NonCopyable in CAN inheritance.
This commit moves the deletion of copy constructor and copy assignment operators to the `mbed::interface::can` class, where both `mbed::CAN` and `mbed::interface::CAN` inherit enum types from. This allows `NonCopyable` to be removed from the inheritance list.
2021-05-07 21:02:34 -04:00
George Beckstein d79446c0da Fix astyle CI failures 2021-05-06 02:09:54 -04:00
George Beckstein 49e58ddab6 Make interface::CAN buildable on targets without DEVICE_CAN
This commit adds provisions to enable using interface::CAN on targets that don't have DEVICE_CAN set to 1 (ie: they don't normally have a CAN peripheral).
2021-05-04 02:23:51 -04:00
George Beckstein d6104c8194 Enable inheritance of CAN enum types
This commit changes the `interface::can` namespace to a `struct`. This allows the enum types to be inherited and prevents breaking old code relying on referencing eg: `CAN::RxIrq`.

When enabled, the polymorphic CAN interface class inherits from this `interface::can` struct. If not enabled, the `mbed::CAN` class inherits from `interface::can` directly.

Co-authored-by: Vincent Coubard <vincent.coubard@arm.com>
2021-05-04 01:29:20 -04:00
George Beckstein be077713b3 Implement polymorphism for CAN 2021-05-04 01:11:32 -04:00
Jaeden Amero 5d20374bc3 Add v8.1-M architecture awareness
Add v8.1-M architecture awareness to Mbed CRC, HAL, and Mbed Atomic.

Fixes #14433
2021-04-23 15:01:16 +01:00
Anna Bridge dddd6341f5
Merge pull request #14437 from ARMmbed/qspi-fix
Remove ownership/acquire in QSPI/OSPI driver
2021-03-26 14:52:52 +00:00
George Psimenos 0b4fdb5e70 Remove ownership in OSPI driver 2021-03-18 17:12:19 +00:00
George Psimenos a28a8684c9 Remove ownership in QSPI driver 2021-03-17 13:26:25 +00:00
George Beckstein 78cfad97d8 Remove virtual from interface operator definitions 2021-03-09 13:22:14 -05:00
George Beckstein 78e33b0926 astyle fixes 2021-03-09 13:01:06 -05:00
George Beckstein 326f5bb898 Implement polymorphism for DigitalInOut
Co-authored-by: Vincent Coubard (pan-) <Vincent.Coubard@arm.com>
2021-03-09 13:01:06 -05:00
George Beckstein 2e6a5522d2 Implement polymorphism for DigitalOut 2021-03-09 13:01:06 -05:00
George Beckstein c64091519f Implement polymorphism for DigitalIn 2021-03-09 13:01:06 -05:00
Harrison Mutai 0214a156e7 Implement override of enable_* functions 2021-01-21 10:20:49 +00:00
Harrison Mutai 7b8ca37bd7 Add declaration to expose enable_* functions from SerialBase
UnBufferedSerial is missing a declaration to expose enable_input and
enable_output, which are inherited from the private base class Serial
Base. Add the using-declaration to the class definition.
2021-01-19 14:28:54 +00:00
pea-pod e1c754b179 Add SPI bitwidths to ST targets where supported 2021-01-11 07:53:07 -06:00
Martin Kojtal be295e42a4
Merge pull request #13917 from LDong-Arm/move_SFDP
Move SFDP to blockdevice
2020-12-10 13:03:23 +00:00
Martin Kojtal 4c94b4b495
Merge pull request #14005 from kjbracey-arm/teinsert
Correct/clarify TimerEvent::insert documentation
2020-12-09 14:18:06 +00:00
Kevin Bracey cf66a6ed13 Correct/clarify TimerEvent::insert documentation
There was much confusion over the functionality of the original
`TimerEvent::insert` call which was described as "Set relative timestamp
of the internal event".

This then extended to my Chrono conversion, meaning the new `insert`
call is not equivalent.

Clarify the original documentation, correct the deprecation messages,
and add more notes on conversion.

No functional change, as the new Chrono API makes more sense - it's just
different from the old API.

Problem actually spotted when I saw the strange code `convert_timestamp`
was producing for the 32-bit->64-bit timestamp conversion. The caller of
it was actually making the mistake of issuing
"TimerEvent::insert(rel_timeout)`, meaning they'd also misunderstood the
documentation, and were not getting the timeout they expected.

(Chrono would have prevented that mistake as durations and time points
are incompatible types).
2020-12-07 16:28:52 +02:00
Lingkai Dong 5d2fbdc11e Move SFDP into blockdevice where it belongs to 2020-11-26 17:31:31 +00:00
Lingkai Dong c41f7cb864 Fix integer type warnings in SFDP and *SPIFBlockDevice 2020-11-26 10:28:58 +00:00
Lingkai Dong e0bd9a1c6a sfdp_iterate_next_largest_erase_type: return -1 if no erase type is applicable 2020-11-25 13:34:01 +00:00
Lingkai Dong ac86aff928 sfdp_iterate_next_largest_erase_type: do not modify type_mask
The supported erase types of a given flash region are indicated
in bitfields of the variable `type_mask`. Even if an erase type
is unused for the current chunk (e.g. size too large, unaligned, etc.),
its bitfield should NOT be cleared - the same erase type might
actually be useful for the next chunk.

The function argument is now a value instead of a reference.
2020-11-24 18:07:34 +00:00
Evelyne Donnaes 9964212f9e Moved USB drivers under drivers/usb 2020-11-12 14:57:00 +00:00
Martin Kojtal f333c3ead1
Merge pull request #13699 from boraozgen/bugfix/sfdp-find-addr-region
Fix sfdp_find_addr_region algorithm
2020-11-12 08:43:02 +00:00
Martino Facchin db7954bc9b STM32: allow high speed USB endpoints 2020-11-10 17:22:28 +01:00
Bora Özgen 7f0716ad60 Fix sfdp_find_addr_region algorithm
sfdp_find_addr_region() was causing issues with SPI
flashes with sector table parsed from SFDP (in
particular SST26VF016B).

In particular, it was returning -1 when address 0 is
passed (probably also if the address in the first
region). I do not know why the search algorithm is
written to search from the higher to lower regions,
but it was obvious that it would fail for the first
region. Also it was harder to read due to the index
manipulation.
2020-11-03 14:23:02 +01:00
rogeryou 48524f25ae add opsi driver 2020-09-16 11:27:23 +08:00
talorion 6625bdb9f3 fixed resets after suspend 2020-09-02 13:39:16 +02:00
George Psimenos 009f91e2cc Move drivers headers 2020-07-31 10:02:47 +01:00