mirror of
https://github.com/espressif/openthread.git
synced 2026-09-01 14:59:54 +00:00
[radio] add radio folder to core (#4045)
This commit renames existing `phy` folder into `radio`. It also renames some of the related files in this folder. It also moves all default/weak `otPlatRadio` implementations to a common `radio_platform_defaults.cpp` file.
This commit is contained in:
committed by
Jonathan Hui
parent
6ebc517408
commit
b1d92846c0
@@ -30,7 +30,7 @@
|
||||
#include "common/debug.hpp"
|
||||
#include "mac/mac.hpp"
|
||||
#include "mac/mac_frame.hpp"
|
||||
#include "phy/phy.hpp"
|
||||
#include "radio/radio.hpp"
|
||||
#include "utils/wrap_string.h"
|
||||
|
||||
#include "test_util.h"
|
||||
@@ -94,7 +94,7 @@ void VerifyChannelMaskContent(const Mac::ChannelMask &aMask, uint8_t *aChannels,
|
||||
uint8_t index = 0;
|
||||
uint8_t channel;
|
||||
|
||||
for (channel = Phy::kChannelMin; channel <= Phy::kChannelMax; channel++)
|
||||
for (channel = Radio::kChannelMin; channel <= Radio::kChannelMax; channel++)
|
||||
{
|
||||
if (index < aLength)
|
||||
{
|
||||
@@ -141,7 +141,7 @@ void TestMacChannelMask(void)
|
||||
uint8_t channles4[] = {20};
|
||||
|
||||
Mac::ChannelMask mask1;
|
||||
Mac::ChannelMask mask2(Phy::kSupportedChannels);
|
||||
Mac::ChannelMask mask2(Radio::kSupportedChannels);
|
||||
|
||||
printf("Testing Mac::ChannelMask\n");
|
||||
|
||||
@@ -149,12 +149,12 @@ void TestMacChannelMask(void)
|
||||
printf("empty = %s\n", mask1.ToString().AsCString());
|
||||
|
||||
VerifyOrQuit(!mask2.IsEmpty(), "ChannelMask.IsEmpty failed\n");
|
||||
VerifyOrQuit(mask2.GetMask() == Phy::kSupportedChannels, "ChannelMask.GetMask() failed\n");
|
||||
VerifyOrQuit(mask2.GetMask() == Radio::kSupportedChannels, "ChannelMask.GetMask() failed\n");
|
||||
printf("all_channels = %s\n", mask2.ToString().AsCString());
|
||||
|
||||
mask1.SetMask(Phy::kSupportedChannels);
|
||||
mask1.SetMask(Radio::kSupportedChannels);
|
||||
VerifyOrQuit(!mask1.IsEmpty(), "ChannelMask.IsEmpty failed\n");
|
||||
VerifyOrQuit(mask1.GetMask() == Phy::kSupportedChannels, "ChannelMask.GetMask() failed\n");
|
||||
VerifyOrQuit(mask1.GetMask() == Radio::kSupportedChannels, "ChannelMask.GetMask() failed\n");
|
||||
|
||||
VerifyChannelMaskContent(mask1, all_channels, sizeof(all_channels));
|
||||
|
||||
@@ -204,8 +204,8 @@ void TestMacChannelMask(void)
|
||||
mask2.Clear();
|
||||
VerifyOrQuit(mask1 == mask2, "ChannelMask.operator== failed\n");
|
||||
|
||||
mask1.SetMask(Phy::kSupportedChannels);
|
||||
mask2.SetMask(Phy::kSupportedChannels);
|
||||
mask1.SetMask(Radio::kSupportedChannels);
|
||||
mask2.SetMask(Radio::kSupportedChannels);
|
||||
VerifyOrQuit(mask1 == mask2, "ChannelMask.operator== failed\n");
|
||||
|
||||
mask1.Clear();
|
||||
|
||||
Reference in New Issue
Block a user