Functions | Variables
erika/oshw.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
#include "oshw.h"
#include "intel_i210.h"
#include "ethercat.h"
#include <machine/endian.h>
Include dependency graph for erika/oshw.c:

Go to the source code of this file.

Functions

ec_adaptertoshw_find_adapters (void)
 
void oshw_free_adapters (ec_adaptert *adapter)
 
uint16 oshw_htons (uint16 host)
 
uint16 oshw_ntohs (uint16 network)
 

Variables

ec_adaptert adapters [DEVS_MAX_NB]
 
int ec_slavecount
 

Function Documentation

◆ oshw_find_adapters()

ec_adaptert* oshw_find_adapters ( void  )

Create list over available network adapters.

Returns
First element in linked list of adapters

Definition at line 52 of file erika/oshw.c.

◆ oshw_free_adapters()

void oshw_free_adapters ( ec_adaptert adapter)

Free memory allocated memory used by adapter collection.

Parameters
[in]adapter= First element in linked list of adapters EC_NOFRAME.

Definition at line 74 of file erika/oshw.c.

◆ oshw_htons()

uint16 oshw_htons ( uint16  host)
inline

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.

Definition at line 31 of file erika/oshw.c.

◆ oshw_ntohs()

uint16 oshw_ntohs ( uint16  network)
inline

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.

Definition at line 43 of file erika/oshw.c.

Variable Documentation

◆ adapters

ec_adaptert adapters[DEVS_MAX_NB]

Definition at line 23 of file erika/oshw.c.

◆ ec_slavecount

int ec_slavecount

number of slaves found on the network

Definition at line 69 of file ethercatmain.c.



soem
Author(s): Arthur Ketels and M.J.G. van den Molengraft
autogenerated on Mon Feb 28 2022 23:46:58