mirror of
https://github.com/espressif/openthread.git
synced 2026-10-08 16:57:39 +00:00
spinel.h: Adjust spacing and alignments (#1510)
This commit is contained in:
committed by
Jonathan Hui
parent
67d9d25593
commit
227d2a091b
+26
-21
@@ -105,7 +105,8 @@ typedef enum
|
|||||||
SPINEL_STATUS_CCA_FAILURE = 18, ///< The packet was not sent due to a CCA failure.
|
SPINEL_STATUS_CCA_FAILURE = 18, ///< The packet was not sent due to a CCA failure.
|
||||||
SPINEL_STATUS_ALREADY = 19, ///< The operation is already in progress.
|
SPINEL_STATUS_ALREADY = 19, ///< The operation is already in progress.
|
||||||
SPINEL_STATUS_ITEM_NOT_FOUND = 20, ///< The given item could not be found.
|
SPINEL_STATUS_ITEM_NOT_FOUND = 20, ///< The given item could not be found.
|
||||||
SPINEL_STATUS_INVALID_COMMAND_FOR_PROP = 21, ///< The given command cannot be performed on this property.
|
SPINEL_STATUS_INVALID_COMMAND_FOR_PROP
|
||||||
|
= 21, ///< The given command cannot be performed on this property.
|
||||||
|
|
||||||
SPINEL_STATUS_JOIN__BEGIN = 104,
|
SPINEL_STATUS_JOIN__BEGIN = 104,
|
||||||
|
|
||||||
@@ -188,7 +189,8 @@ typedef enum
|
|||||||
SPINEL_POWER_STATE_ONLINE = 4,
|
SPINEL_POWER_STATE_ONLINE = 4,
|
||||||
} spinel_power_state_t;
|
} spinel_power_state_t;
|
||||||
|
|
||||||
enum {
|
enum
|
||||||
|
{
|
||||||
SPINEL_NET_FLAG_ON_MESH = (1 << 0),
|
SPINEL_NET_FLAG_ON_MESH = (1 << 0),
|
||||||
SPINEL_NET_FLAG_DEFAULT_ROUTE = (1 << 1),
|
SPINEL_NET_FLAG_DEFAULT_ROUTE = (1 << 1),
|
||||||
SPINEL_NET_FLAG_CONFIGURE = (1 << 2),
|
SPINEL_NET_FLAG_CONFIGURE = (1 << 2),
|
||||||
@@ -819,7 +821,6 @@ typedef enum
|
|||||||
SPINEL_PROP_IPV6_ADDRESS_TABLE = SPINEL_PROP_IPV6__BEGIN + 3, ///< array(ipv6addr,prefixlen,valid,preferred,flags) [A(t(6CLLC))]
|
SPINEL_PROP_IPV6_ADDRESS_TABLE = SPINEL_PROP_IPV6__BEGIN + 3, ///< array(ipv6addr,prefixlen,valid,preferred,flags) [A(t(6CLLC))]
|
||||||
SPINEL_PROP_IPV6_ROUTE_TABLE = SPINEL_PROP_IPV6__BEGIN + 4, ///< array(ipv6prefix,prefixlen,iface,flags) [A(t(6CCC))]
|
SPINEL_PROP_IPV6_ROUTE_TABLE = SPINEL_PROP_IPV6__BEGIN + 4, ///< array(ipv6prefix,prefixlen,iface,flags) [A(t(6CCC))]
|
||||||
|
|
||||||
|
|
||||||
/// IPv6 ICMP Ping Offload
|
/// IPv6 ICMP Ping Offload
|
||||||
/** Format: `b`
|
/** Format: `b`
|
||||||
*
|
*
|
||||||
@@ -839,7 +840,6 @@ typedef enum
|
|||||||
SPINEL_PROP_STREAM_NET_INSECURE = SPINEL_PROP_STREAM__BEGIN + 3, ///< [dD]
|
SPINEL_PROP_STREAM_NET_INSECURE = SPINEL_PROP_STREAM__BEGIN + 3, ///< [dD]
|
||||||
SPINEL_PROP_STREAM__END = 0x80,
|
SPINEL_PROP_STREAM__END = 0x80,
|
||||||
|
|
||||||
|
|
||||||
/// UART Bitrate
|
/// UART Bitrate
|
||||||
/** Format: `L`
|
/** Format: `L`
|
||||||
*
|
*
|
||||||
@@ -886,9 +886,12 @@ typedef enum
|
|||||||
// For brevity, the entire 802.15.4 PIB space is
|
// For brevity, the entire 802.15.4 PIB space is
|
||||||
// not defined here, but a few choice attributes
|
// not defined here, but a few choice attributes
|
||||||
// are defined for illustration and convenience.
|
// are defined for illustration and convenience.
|
||||||
SPINEL_PROP_15_4_PIB_PHY_CHANNELS_SUPPORTED = SPINEL_PROP_15_4_PIB__BEGIN + 0x01, ///< [A(L)]
|
SPINEL_PROP_15_4_PIB_PHY_CHANNELS_SUPPORTED
|
||||||
SPINEL_PROP_15_4_PIB_MAC_PROMISCUOUS_MODE = SPINEL_PROP_15_4_PIB__BEGIN + 0x51, ///< [b]
|
= SPINEL_PROP_15_4_PIB__BEGIN + 0x01, ///< [A(L)]
|
||||||
SPINEL_PROP_15_4_PIB_MAC_SECURITY_ENABLED = SPINEL_PROP_15_4_PIB__BEGIN + 0x5d, ///< [b]
|
SPINEL_PROP_15_4_PIB_MAC_PROMISCUOUS_MODE
|
||||||
|
= SPINEL_PROP_15_4_PIB__BEGIN + 0x51, ///< [b]
|
||||||
|
SPINEL_PROP_15_4_PIB_MAC_SECURITY_ENABLED
|
||||||
|
= SPINEL_PROP_15_4_PIB__BEGIN + 0x5d, ///< [b]
|
||||||
SPINEL_PROP_15_4_PIB__END = 1280,
|
SPINEL_PROP_15_4_PIB__END = 1280,
|
||||||
|
|
||||||
SPINEL_PROP_CNTR__BEGIN = 1280,
|
SPINEL_PROP_CNTR__BEGIN = 1280,
|
||||||
@@ -1092,13 +1095,11 @@ typedef enum
|
|||||||
|
|
||||||
/// The legacy network ULA prefix (8 bytes)
|
/// The legacy network ULA prefix (8 bytes)
|
||||||
/** Format: 'D' */
|
/** Format: 'D' */
|
||||||
SPINEL_PROP_NEST_LEGACY_ULA_PREFIX
|
SPINEL_PROP_NEST_LEGACY_ULA_PREFIX = SPINEL_PROP_NEST__BEGIN + 1,
|
||||||
= SPINEL_PROP_NEST__BEGIN + 1,
|
|
||||||
|
|
||||||
/// A (newly) joined legacy node (this is signaled from NCP)
|
/// A (newly) joined legacy node (this is signaled from NCP)
|
||||||
/** Format: 'E' */
|
/** Format: 'E' */
|
||||||
SPINEL_PROP_NEST_LEGACY_JOINED_NODE
|
SPINEL_PROP_NEST_LEGACY_JOINED_NODE = SPINEL_PROP_NEST__BEGIN + 2,
|
||||||
= SPINEL_PROP_NEST__BEGIN + 2,
|
|
||||||
|
|
||||||
SPINEL_PROP_NEST__END = 15360,
|
SPINEL_PROP_NEST__END = 15360,
|
||||||
|
|
||||||
@@ -1113,8 +1114,7 @@ typedef enum
|
|||||||
/// NCP to reset, but if this is not supported a `false` boolean
|
/// NCP to reset, but if this is not supported a `false` boolean
|
||||||
/// is returned in response.
|
/// is returned in response.
|
||||||
/** Format: 'b' (read-only) */
|
/** Format: 'b' (read-only) */
|
||||||
SPINEL_PROP_DEBUG_TEST_ASSERT
|
SPINEL_PROP_DEBUG_TEST_ASSERT = SPINEL_PROP_DEBUG__BEGIN + 0,
|
||||||
= SPINEL_PROP_DEBUG__BEGIN + 0,
|
|
||||||
|
|
||||||
/// The NCP log level.
|
/// The NCP log level.
|
||||||
/** Format: `C` */
|
/** Format: `C` */
|
||||||
@@ -1146,10 +1146,17 @@ typedef enum
|
|||||||
|
|
||||||
#define SPINEL_GET_NEXT_TID(x) (spinel_tid_t)((x)>=0xF?1:(x)+1)
|
#define SPINEL_GET_NEXT_TID(x) (spinel_tid_t)((x)>=0xF?1:(x)+1)
|
||||||
|
|
||||||
#define SPINEL_BEACON_THREAD_FLAG_VERSION_SHIFT 4
|
#define SPINEL_BEACON_THREAD_FLAG_VERSION_SHIFT \
|
||||||
#define SPINEL_BEACON_THREAD_FLAG_VERSION_MASK (0xf << SPINEL_BEACON_THREAD_FLAG_VERSION_SHIFT)
|
4
|
||||||
#define SPINEL_BEACON_THREAD_FLAG_JOINABLE (1 << 0)
|
|
||||||
#define SPINEL_BEACON_THREAD_FLAG_NATIVE (1 << 3)
|
#define SPINEL_BEACON_THREAD_FLAG_VERSION_MASK \
|
||||||
|
(0xf << SPINEL_BEACON_THREAD_FLAG_VERSION_SHIFT)
|
||||||
|
|
||||||
|
#define SPINEL_BEACON_THREAD_FLAG_JOINABLE \
|
||||||
|
(1 << 0)
|
||||||
|
|
||||||
|
#define SPINEL_BEACON_THREAD_FLAG_NATIVE \
|
||||||
|
(1 << 3)
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
@@ -1200,12 +1207,10 @@ typedef char spinel_datatype_t;
|
|||||||
#define SPINEL_DATATYPE_ARRAY_STRUCT_S(x) \
|
#define SPINEL_DATATYPE_ARRAY_STRUCT_S(x) \
|
||||||
SPINEL_DATATYPE_ARRAY_S(SPINEL_DATATYPE_STRUCT_WLEN_S(x))
|
SPINEL_DATATYPE_ARRAY_S(SPINEL_DATATYPE_STRUCT_WLEN_S(x))
|
||||||
|
|
||||||
#define SPINEL_DATATYPE_COMMAND_S \
|
#define SPINEL_DATATYPE_COMMAND_S SPINEL_DATATYPE_UINT8_S /* header */ \
|
||||||
SPINEL_DATATYPE_UINT8_S /* header */ \
|
|
||||||
SPINEL_DATATYPE_UINT_PACKED_S /* command */
|
SPINEL_DATATYPE_UINT_PACKED_S /* command */
|
||||||
|
|
||||||
#define SPINEL_DATATYPE_COMMAND_PROP_S \
|
#define SPINEL_DATATYPE_COMMAND_PROP_S SPINEL_DATATYPE_COMMAND_S /* prop command */ \
|
||||||
SPINEL_DATATYPE_COMMAND_S /* prop command */ \
|
|
||||||
SPINEL_DATATYPE_UINT_PACKED_S /* property id */
|
SPINEL_DATATYPE_UINT_PACKED_S /* property id */
|
||||||
|
|
||||||
#define SPINEL_DATATYPE_MAC_SCAN_RESULT_S(mac_format_str, net_format_str) \
|
#define SPINEL_DATATYPE_MAC_SCAN_RESULT_S(mac_format_str, net_format_str) \
|
||||||
|
|||||||
Reference in New Issue
Block a user