📄 vmac.h
字号:
#ifndef _VMAC_H
#define _VMAC_H
#include "message.h"
#include "sos_types.h"
//packe sos message into RADIO(USE CHIPCON SPP LIBRARY)
/*struct vmac_payload
{
sos_pid_t did; //!< module destination id
sos_pid_t sid; //!< module source id
uint16_t daddr; //!< node destination address
uint16_t saddr; //!< node source address
uint8_t type; //!< module specific message type
uint8_t len; //!< payload length
uint8_t *data; //!< actual payload
uint16_t flag; //!< flag to indicate the status of message, see below
uint8_t payload[SOS_MSG_PAYLOAD_LENGTH]; //!< statically allocated payload
};
typedef struct vmac_payload vmac_payload;
*/
/*shoule be modified if struct Message changed
sos_pid_t did 1
sos_pid_t sid 1
uint16_t daddr 2
uint16_t saddr 2
uint8_t type 1
uint8_t len 1
uint16_t flag 2
//uint16_t seq; 2 BY zhou ya jin . seq no is not sent in msg. It is controled by application
*/
#define MESSAGE_RADIO_PAYLOAD_HEADER_LEN 10
extern void radio_msg_alloc(Message *msg);
extern void mac_init();
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -