We strongly encourage users to use Package manager for sharing their code on Libstock website, because it boosts your efficiency and leaves the end user with no room for error. [more info]
Rating:
Author: MIKROE
Last Updated: 2018-03-13
Package Version: 1.0.0.0
mikroSDK Library: 1.0.0.0
Category: Ethernet
Downloaded: 6134 times
Not followed.
License: MIT license
BroadR-Reach click brings the industry grade communication standard to the mikroBUSâ„¢, which is built to be used in an Ethernet-based open network.
Do you want to subscribe in order to receive notifications regarding "BroadR Reach click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "BroadR Reach click" changes.
Do you want to report abuse regarding "BroadR Reach click".
Library Description
BroadR-Reach click library contains basic functions for controlling the click board, but also the advanced functions, which abstract basic operations to a simple send or receive functions.
Key functions:
uint8_t broadr_socketOpen(uint8_t socket, uint8_t mode, uint16_t settings)- Opens a socket in the selected mode, enabling its operation
uint8_t broadr_sendData(uint8_t socket, uint8_t * pSendData, uint16_t bytesCount)- Ends data from the selected socket
uint8_t broadr_receiveData(uint8_t socket, uint8_t mode, uint8_t * pReceiveData, uint8_t * headerInformation)- Reads received data from the selected socket
Examples Description
The application is composed of three sections :
* Sends sendData */ broadr_sendData(_BROADR_SOCKET0, &sendData, 18); /* * Checks if data is received, and writes received data if so. */ if (broadr_getReceivedSize(_BROADR_SOCKET0)) { mikrobus_logWrite("Received data:", _LOG_LINE); broadr_receiveData(_BROADR_SOCKET0, _BROADR_MODE_UDP, &receivedData, &receiveHeader); mikrobus_logWrite(receivedData, _LOG_LINE); } else { mikrobus_logWrite("No data received.", _LOG_LINE); } /* * Increments packet number in send data text, resets after 99. */ sendData[16] = sendData[16] + 1; if (sendData[16] > '9') { sendData[16] = '0'; sendData[15] = sendData[15] + 1; } if (sendData[15] > '9') { sendData[15] = '0'; } Delay_ms(1000);
Other mikroE Libraries used in the example:
Additional notes and information
Depending on the development board you are using, you may need USB UART click, USB UART 2 clickor RS232 click to connect to your PC, for development systems with no UART to USB interface available on the board. The terminal available in all MikroElektronika compilers, or any other terminal application of your choice, can be used to read the message.