[spinel] move definition of coprocessor type to lib/spinel (#10208)

This commit moves the definition of coprocessor_type from posix to
lib/spinel directory. There are two reasons to do so:
1. Allow platforms other than posix to access the definition. For
   example, nxp imt-rx.
2. Allow the user (posix/main.c) of OT system API to access the
   definition. Currently the posix main depends on OT system API but
   doesn't depend on definitions in 'platform-posix.h'. This should be
   kept.
This commit is contained in:
Li Cao
2024-05-08 11:29:25 -07:00
committed by GitHub
parent 383d0d2815
commit 00f7c3131b
3 changed files with 5 additions and 5 deletions
@@ -26,8 +26,8 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef OT_PLATFORM_COPROCESSOR_MODE_H_
#define OT_PLATFORM_COPROCESSOR_MODE_H_
#ifndef COPROCESSOR_TYPE_H_
#define COPROCESSOR_TYPE_H_
#ifdef __cplusplus
extern "C" {
@@ -47,4 +47,4 @@ typedef enum CoprocessorType
#ifdef __cplusplus
}
#endif
#endif // OT_PLATFORM_COPROCESSOR_MODE_H_
#endif // COPROCESSOR_TYPE_H_
+1 -1
View File
@@ -31,10 +31,10 @@
#include <openthread/instance.h>
#include "lib/spinel/coprocessor_type.h"
#include "lib/spinel/logger.hpp"
#include "lib/spinel/spinel.h"
#include "lib/spinel/spinel_interface.hpp"
#include "posix/platform/coprocessor_type.h"
namespace ot {
namespace Spinel {
+1 -1
View File
@@ -52,8 +52,8 @@
#include <openthread/openthread-system.h>
#include <openthread/platform/time.h>
#include "coprocessor_type.h"
#include "lib/platform/exit_code.h"
#include "lib/spinel/coprocessor_type.h"
#include "lib/url/url.hpp"
/**