如何解决C/C++,在 Doxygen 的结构中记录结构
我对 doxygen 还很陌生。我正在尝试为我们的 Onethinx LoRaWAN 模块记录一些库。我们在联合内部的结构中使用 struct 在两个内核(ARM Cortex M4 和 M0+)之间传递一些数据。结构紧凑,可根据需要使用尽可能少的空间。
typedef union {
struct __attribute__ ((__packed__)) {
struct __attribute__ ((__packed__)) {
bool Confirmed : 1; //!< Conformation of the uplink message
uint8_t : 7; //!< Reserved,do not use
Radio_DataRate_e DataRate : 8; //!< LoRaWAN Send data rate
Radio_TXpower_e Power : 8; //!< LoRaWAN Send output power
uint8_t FPort : 8; //!< Port Field for distinguishing different messages (0 = reserved for MAC commands)
} TX;
struct __attribute__ ((__packed__)) {
LoRaWAN_keys_t * KeysPtr;
Radio_DataRate_e DataRate : 8; //!< LoRaWAN Join Data Rate. Not used for US version (defined by LoRaWAN spec)
Radio_TXpower_e Power : 8; //!< LoRaWAN Join output power
uint8_t MAXTries : 8; //!< Maximum tries before Join fails. Join requests are spaced out according to the LoRaWAN specification.
uint8_t SubBand_1st : 4; //!< LoRaWAN First Sub-Band
uint8_t SubBand_2nd : 4; //!< LoRaWAN Second Sub-Band
} Join;
struct __attribute__ ((__packed__)) {
struct {
IdleMode_e Mode : 2; //!< Set Idle Mode to idleActive,idleSleep or idleDeepSleep
bool BleEcoON : 1; //!< Leaves BLE ECO ON during idle. Consumes additional power,enable only when ECO/BLE functionality is needed
bool DebugON : 1; //!< Leaves Debug Port active during idle. Consumes additional power,enable only for debugging purposes
} Idle;
} System;
};
uint8_t reserved[32];
} coreConfiguration_t;
我在用 doxygen 区分什么是可变的,什么不是。有人可以推荐一种方法来解决这个问题吗?你会如何记录这个?
我宁愿不分享我在记录这一点时所做的糟糕尝试。任何帮助都是好的!
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。