1 組の MRF24J40 無線チップを使用して、1 つの PIC32 マイクロコントローラー ボードが RF 伝送を介して別のボードと通信できるようにしています。すべてのコードを正常にコンパイルできましたが、このコードに関連するエラーが発生し続けます。
typedef struct
{
union
{
BYTE Val;
struct
{
BYTE packetType :2; // type of packet. Possible types are
// * PACKET_TYPE_DATA - Data type
// * PACKET_TYPE_COMMAND - Command type
// * PACKET_TYPE_ACK - Acknowledgement type
// * PACKET_TYPE_RESERVE - Reserved type
BYTE broadcast :1; // 1: broadcast, 0: unicast
BYTE secEn :1; // 1: secure the MAC payload, 0: send plain text
BYTE repeat :1; // 1: allow repeaters to forward the message, 0: send message directly
BYTE ackReq :1; // 1: acknowledgement required, 0: no acknowldgement
BYTE destPrsnt :1; // 1: destination address in the packet, 0: destination address not in the packet
BYTE sourcePrsnt :1; // 1: source address in the packet, 0: source address not in the packet
} bits;
} flags;
BYTE * SourceAddress; // Address of the Sender
BYTE * Payload; // Pointer to the payload
BYTE PayloadLen; // Payload size
BYTE RSSIValue; // RSSI value for the received packet
BYTE LQIValue; // LQI value for the received packet
#if defined(IEEE_802_15_4)
BOOL altSourceAddress; // Source address is the alternative network address
WORD_VAL SourcePANID; // PAN ID of the sender
#endif
} MAC_RECEIVED_PACKET;
基本的に、変数packetType
、などの値を変更できるように、地球上のすべてを試しました。宣言の直後に値を変更しようとしましたが、値ではなくビット長のようです。コード(マイクロチップのウェブサイトから直接)には、1 = this および 0 = that というコメントがありますが、これらの値を変更できる場所が見つかりませんでした。これらの MRF24J40 チップに詳しい方からの助けをいただければ幸いです。ありがとうございました。secEn
ackReq