Commit Graph

12 Commits (master)

Author SHA1 Message Date
Hari Limaye f4e5359710 GPIO: Use uintptr_t for gpio_irq_api context
The HAL gpio_irq_api stores object IDs, which serve as a form of context
for the dispatch of the interrupt handler in the drivers level
InterruptIn Class. The way this is achieved is that the InterruptIn
Class casts its address to uint32_t, which is stored as the ID.
This results in compilation failure when the size of an object pointer
is greater than uint32_t, for example when building on a PC for unit
testing.

In order to allow Unit Testing of the InterruptIn Class, we replace the
use of uint32_t with uintptr_t (type capable of holding a pointer),
which allows portability and expresses intentions more clearly.
In aid of this latter goal, we also replace the use of the name "id"
with "context", to improve clarity - these are addresses of the context
related to that callback.
2022-01-26 18:12:52 +00:00
Hari Limaye f95052cf6f CMake: Require TEST_SOURCES in greentea CMake file
Assumption that greentea test file is always named main.cpp is
incorrect. Updated mbed_greentea_add_test() macro to make TEST_SOURCES
parameter compulsory, which is used to specify greentea test
file(s). This allows tests to use C, or have a different name.
Therefore also updated all pre-existing greentea test CMake files to
explicity add main.cpp to TEST_SOURCES.
2021-06-29 13:33:42 +01:00
Hari Limaye 3e71692b27 CMake: Remove unnecessary CMakeLists.txt
CMakeLists.txt file in /hal/tests/TESTS/mbed_hal_fpga_ci_test_shield
directory was non-functional as it used the greentea_add_test macro,
which expects a main.cpp in current directory, but no main.cpp exists
there. I checked with @rajkan01 who confirmed that this CMake file is
serving no purpose and is there erroneously. All tests in subdirectories
of this directory have their own CMakeLists.txt that successfully build
them.
2021-06-29 13:32:57 +01:00
George Psimenos 4091306f10 Update FPGA documentation 2021-04-06 15:13:51 +01:00
Anna Bridge 76f470411a
Merge pull request #14450 from jeromecoutant/PR_SPI_WB
FPGA SPI : decrease test frequency for ASYNC test cases
2021-03-26 14:52:00 +00:00
jeromecoutant b943c4474a FPGA SPI : decrease test frequency for ASYNC test cases 2021-03-19 11:34:23 +01:00
jeromecoutant eca714c93f [STD-PIN] update tests and components 2021-03-18 17:01:50 +00:00
Rajkumar Kanagaraj 6824b14e48 CMake: rename greentea test macro 2021-02-02 07:43:40 -08:00
Rajkumar Kanagaraj 7d7159d20f
Apply suggestions from code review
Co-authored-by: Hugues Kamba <41612201+hugueskamba@users.noreply.github.com>
2021-01-08 03:21:03 -08:00
Rajkumar Kanagaraj d9f2d765f4 CMake: Add support for mbed_hal_fpga_ci_test_shield greentea test 2021-01-05 09:10:45 -08:00
Rajkumar Kanagaraj 2bc7bb7a52 - Remove components reference from travis
- update readme
2020-09-11 14:33:18 +01:00
Rajkumar Kanagaraj 159410bea7 Move greentea tests closure to library 2020-08-25 15:15:53 +01:00