Commit Graph

282 Commits (10c6a277d34e757c1b8d4829343ae20ed6936036)

Author SHA1 Message Date
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
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
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
paul-szczepanek-arm 52a0b649bc fix documentation and example 2018-10-23 12:03:59 +01:00
Thomas Kemmer fdc675441a Clean up UARTSerial.cpp includes. 2018-10-21 15:35:40 +02:00
Cruz Monrreal II 660bc2d446 Merge branch 'doc_fix_pwm' of ssh://github.com/TacoGrandeTX/mbed-os into rollup 2018-10-18 20:01:39 -05:00