Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: SOEM SPI_STMPE610 SPI_TFT_ILI9341 TFT_fonts
SOEM/oshw/oshw.cpp
- Committer:
- sulymarco
- Date:
- 2019-06-11
- Revision:
- 0:7077d8f28b3e
File content as of revision 0:7077d8f28b3e:
/*
* Licensed under the GNU General Public License version 2 with exceptions. See
* LICENSE file in the project root for full license information
*/
#include "oshw.h"
#include <stdlib.h>
#include "lwip/def.h"
/**
* Host to Network byte order (i.e. to big endian).
*
* Note that Ethercat uses little endian byte order, except for the Ethernet
* header which is big endian as usual.
*/
uint16 oshw_htons(const uint16 host)
{
return htons (host);
}
/**
* Network (i.e. big endian) to Host byte order.
*
* Note that Ethercat uses little endian byte order, except for the Ethernet
* header which is big endian as usual.
*/
uint16 oshw_ntohs(const uint16 network)
{
return ntohs (network);
}
/* Create list over available network adapters.
* @return First element in linked list of adapters
*/
ec_adaptert * oshw_find_adapters(void)
{
ec_adaptert * ret_adapter = NULL;
/* TODO if needed */
return ret_adapter;
}
/** Free memory allocated memory used by adapter collection.
* @param[in] adapter = First element in linked list of adapters
* EC_NOFRAME.
*/
void oshw_free_adapters(ec_adaptert * adapter)
{
/* TODO if needed */
}
