Description of TI's API for the webee cc2530 basicrf of the cc2530

Source: Internet
Author: User

Ti exampleProgramFor the document found in, perform a simple translation

This is the basicrfcfg_t struct. If you want to use this API, you must use the struct.

Myaddr 16-bit short address, which is the address of the ZigBee module.

PanidThe ZigBee protocol uses a 16-bit regional network identifier (Pan ID) to identify a network. Different panids indicate different networks, which can be called network names.

Channel RF channel (must be between 11 and 26 );

If ackrequest is true, obtain the ACK signal from the ZigBee module of the target address.

The last two are used for security. Because I do not need security information, I have no details.

Function:

Void basicrfinit (basicrfcfg_t * prfconfig); initializes the struct.


Uint8 basicrfsendpacket (uint16 destaddr, uint8 * ppayload, uint8 length)

Send packet to the given destination short address. returns true if packet was sent

Successfully, and failed otherwise. If ackrequest is true the return value of this function
Will only be true if an acknowledgment is already ed from the destination.

Send the package to the specified address-destaddr. If true is returned, the packet is successfully sent. If false, the opposite is returned.



Uint8 basicrfpacketisready (void)
Returns true if a received ed packet is ready to be retrieved by higher layer.

If the upper layer is ready to receive the sent package, the returned result is true.


Int8 basicrfgetarg (void)
Returns the receipt value of the last modified ed Packet

Returns the final packet's HTTP/HTTPS value. This function is generally used to obtain the network condition to determine whether the transmit power should be increased or decreased.

Uint8 basicrfreceive (uint8 * prxdata, uint8 Len, int16 * prssi)
Retrieve packet from basic RF layer. The caller is responsible for allocating buffer space
Data and the ARG value.

// Neither do I understand

Void basicrfreceiveon (void)
Turn on receiveron radio. After calling this function the radio is kept on
Basicrfreceiveoff is called.

Open the RF module, as long as this function is called, if you do not call the following function, the RF module will remain on

Void basicrfreceiveoff (void)
Turn Off receiver er on radio, and keep it off unless for transmitting a packet with Clear Channel
Assessment.

Disable the RF module.



,,,,,

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.