MRF24J40 라디오 칩을 사용하여 하나의 PIC32 마이크로 컨트롤러 보드가 RF 전송을 통해 다른 하나와 통신하게합니다. 모든 코드가 제대로 컴파일되었지만이 코드와 관련된 오류가 계속 발생합니다. 지구에마이크로 칩 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;
기본적으로 내가 해봤 다 내가 직접 선언 후 값을 변경하려고했습니다 ackReq
등 변수 packetType
, secEn
의 값을 변경 할 수 있지만 그 비트 것 같다 길이가 아닌 값. 마이크로 칩의 웹 사이트에서 나온 코드에는 1 = this와 0 =이 있지만 그 값을 변경할 수있는 곳을 찾을 수 없다는 주석이 있습니다. 이 MRF24J40 칩에 익숙한 사람의 도움을 받아 주시면 감사하겠습니다. 고맙습니다.