Commit Graph

32 Commits (86dad5cda90f452b0d30af0c1d1530bd31ecc5d0)

Author SHA1 Message Date
Kevin Bracey cd6e7bb4cf USB: Convert to Chrono 2020-04-30 13:33:15 +03:00
Veijo Pesonen a088d30b6d SFDP: whitespace cleanup 2020-03-17 17:43:09 +02:00
Veijo Pesonen 98dbebb3ed SFDP: Refactor Sector Map Parameter Table parsing
Doxygen documentation was updated.

Code reorganized to make it more readable.

Moves SFDP specific bits out from Q/SPIFBlockDevices.
2020-03-02 11:07:03 +02:00
Veijo Pesonen c84deff782 SFDP: consolidates check for addressability
Takes implementations found from SPIFBlockDevice and QSPIFBlockDevice
and makes those as part of the SFDP module.
2020-03-02 11:04:05 +02:00
Veijo Pesonen 2ce3bed910 SFDP: consolidates device density detection
Combines implementations found from SPIFBlockDevice and QSPIFBlockDevice
and makes it as part of the SFDP module.
2020-03-02 11:02:09 +02:00
Veijo Pesonen c953b656ac SFDP: provides doxygen documentation improvements 2020-02-26 13:44:34 +02:00
Veijo Pesonen ca704a4b3d SFDP: consolidates erase region search
Merges erase region search found from SPIFBlockDevice and
QSPIFBlockDevice. Moves the implementation within the SFDP
component
2020-02-26 12:41:34 +02:00
Veijo Pesonen 107f003af6 SFDP: sanitizes API 2020-02-20 09:46:41 +02:00
Veijo Pesonen 6a60574cf5 SFDP: consolidates sfdp_detect_erase_types_inst_and_size 2020-02-20 09:46:40 +02:00
Veijo Pesonen 2da963b8de Q/SPIFBlockDevice: unifies _sfdp_detect_erase_types_inst_and_size functions 2020-02-20 09:46:40 +02:00
Veijo Pesonen 7d1886ecae SFDP: consolidation of sfdp_detect_page_size 2020-02-20 09:46:40 +02:00
Veijo Pesonen e784c15c9e SFDP: doxygen improvements 2020-02-07 09:52:12 +02:00
Veijo Pesonen 4f4ef6069e SFDP: Sector Map Parameter Table naming improvements 2020-02-07 09:52:12 +02:00
Veijo Pesonen 57722666a1 SPIFBlockDevice: Consolidates SFDP info data
This far all SFDP Sector Map Table related data has been found in small
pieces inside SPIFBlockDevice. Purpose was to consolidate the data
under one SFDP structure where all the information gathered from
SFDP tables is stored.

More generic version of a function used for parsing a Sector Map Table
was taken into use to avoid duplicate code. The implementation taken
into use is the one which got split from QSPIFBlockDevice and resides
now under the SFDP module.
2020-02-07 09:52:11 +02:00
Veijo Pesonen 7518a35da3 SFDP: data structures got refactored 2020-02-07 09:52:11 +02:00
Veijo Pesonen 6108f384fb QSPIFBlockDevice: Consolidates SFDP info data
This far all SFDP Sector Map Table related data has been found in small
pieces inside QSPIFBlockDevice. Purpose was to consolidate the data
under one SFDP structure where all the information gathered from
SFDP tables is stored.

Parsing a Sector Map Table was made more generic so that later it can be
moved under SFDP module. Once that is done it can be shared with
SPIFBlockDevice to avoid code duplication.
2020-02-07 09:52:11 +02:00
Veijo Pesonen 4e1fb07633 SFDP: reorganizes internal info structure 2020-02-07 09:52:11 +02:00
Martin Kojtal 952799ccc8
Merge pull request #12270 from VeijoPesonen/bugfix_sfdp_parse_sfdp_headers
BUGFIX: SFDP Sector Map Table Parameter ID LSB is 0x81
2020-02-06 08:48:16 +00:00
Veijo Pesonen 6bd3933652 Q/SPIFBlockDevice: Separates SFDP Header retrieval
Separates SFDP header retrieval and moves it as a part of the earlier
introduced SFDP file.

Purpose is to abstract away differences between SPIF and QSPIF devices
when it comes to fetching the SFDP headers from a device.
2020-01-20 16:36:21 +02:00
Veijo Pesonen a7e97ef93f SFDP: Improves code's comment-sections 2020-01-20 12:53:38 +02:00
Veijo Pesonen cefae9020e SFDP: splits header parsing to its own file
SFDP logic is the same between SPIF and QSIP.
2020-01-17 14:43:03 +02: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
Kevin Bracey a995c162ac Revise MbedCRC template
* Use compile-time detection of hardware CRC capability, so unneeded
  code and tables do not go into the image.
* Add global JSON config option to allow choice between no tables,
  16-entry tables or 256-entry tables for software CRC. Default set
  to 16-entry, reducing ROM size from previous 256-entry.
* Allow manual override in template parameter to force software or
  bitwise CRC for a particular instance.
* Micro-optimisations, particularly use of `RBIT` instruction and
  optimising bitwise computation using inline assembler.

Incompatible changes:

* Remove special-case "POLY_32BIT_REV_ANSI" - users can use standard
  POLY_32BIT_ANSI, which now uses the same 16-entry tables by default,
  or can use hardware acceleration, which was disabled for
  POLY_32BIT_REV_ANSI. MbedCRC<POLY_32BIT_ANSI, 32, CrcMode::TABLE> can
  be used to force software like POLY_32BIT_REV_ANSI.
* The precomputed table for POLY_16BIT_IBM had errors - this has been
  corrected, but software CRC results will be different from the previous
  software calculation.
* < 8-bit CRC results are no longer are shifted up in the output value,
  but placed in the lowest bits, like other sizes. This means that code
  performing the SD command CRC will now need to use `(crc << 1) | 1`,
  rather than `crc | 1`.
2019-12-02 14:45:37 +02:00
Martin Kojtal 5f7ecea00b
Revert "MbedCRC and CRC HAL revisions" 2019-11-26 13:45:37 +00:00
Kevin Bracey 3939c992d4 Revise MbedCRC template
* Use compile-time detection of hardware CRC capability, so unneeded
  code and tables do not go into the image.
* Add global JSON config option to allow choice between no tables,
  16-entry tables or 256-entry tables for software CRC. Default set
  to 16-entry, reducing ROM size from previous 256-entry.
* Allow manual override in template parameter to force software or
  bitwise CRC for a particular instance.
* Micro-optimisations, particularly use of `RBIT` instruction and
  optimising bitwise computation using inline assembler.

Incompatible changes:

* Remove special-case "POLY_32BIT_REV_ANSI" - users can use standard
  POLY_32BIT_ANSI, which now uses the same 16-entry tables by default,
  or can use hardware acceleration, which was disabled for
  POLY_32BIT_REV_ANSI. MbedCRC<POLY_32BIT_ANSI, 32, CrcMode::TABLE> can
  be used to force software like POLY_32BIT_REV_ANSI.
* The precomputed table for POLY_16BIT_IBM had errors - this has been
  corrected, but software CRC results will be different from the previous
  software calculation.
* < 8-bit CRC results are no longer are shifted up in the output value,
  but placed in the lowest bits, like other sizes. This means that code
  performing the SD command CRC will now need to use `(crc << 1) | 1`,
  rather than `crc | 1`.
2019-11-13 14:31:49 +02:00
Hugues Kamba a3f20f858b USBDevice: add documentation on USB suspend/resume to enter deep sleep
It is possible to temporarily suspend USB and safely preserve its
configuration. This is needed to allow a device to enter deep
sleep as a USBDevice instance prevents deep sleep. USB operation can be
suspended with `deinit` and restored with `connect`.
2019-10-11 08:41:07 +01:00
Hugues Kamba 5933dec3b7 Harmonise Doxygen comments in drivers, events, platform and rtos dirs
When a Doxygen group has been defined (created), all its needed to add
documentation to that group is `\addtogroup`. Since all the information
about the group is preserved, it is not necessary to mention the group
hierarchy again with `\ingroup`. This PR removes unnecessary Doxygen lines
across the `drivers`, `events`, `platform` and `rtos` directories.

It also ensures that new groups are created with `\defgroup` once and
referenced with `\addtogroup` whenever documentation needs to be added to
an existing group.
2019-09-09 10:59:51 +01:00
Martino Facchin 84e228a48f Allow USB endpoint_add to accept mbed::Callback
In this way we can use the USBDevice infrastructure without deriving directly from USBDevice.
2019-08-21 15:22:06 +02: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
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 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