Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drivers/mrf24j40: add support for IEEE 802.15.4 Radio HAL #18472

Merged
merged 14 commits into from
Jan 19, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
tests/ieee802154_hal: use blocking CCA when no IRQ is present
  • Loading branch information
jia200x committed Jan 19, 2023
commit 4d81677afdbb74ad290c89cb5d49f926467bd904
18 changes: 13 additions & 5 deletions tests/ieee802154_hal/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -376,12 +376,20 @@ int _cca(int argc, char **argv)
{
(void) argc;
(void) argv;
if (ieee802154_radio_request_cca(&_radio[0]) < 0) {
puts("Couldn't perform CCA");

int res;
if (ieee802154_radio_has_irq_cca_done(&_radio[0])) {
if (ieee802154_radio_request_cca(&_radio[0]) < 0) {
puts("Couldn't perform CCA");
return -ENODEV;
}
mutex_lock(&lock);
res = ieee802154_radio_confirm_cca(&_radio[0]);
expect(res >= 0);
}
else {
res = ieee802154_radio_cca(&_radio[0]);
}
mutex_lock(&lock);
int res = ieee802154_radio_confirm_cca(&_radio[0]);
expect(res >= 0);

if (res > 0) {
puts("CLEAR");
Expand Down