libethercat - an embeddable realtime EtherCAT-master library
Communicate with EtherCAT slaves attached to a Network interface.
|
hardware access functions More...
#include <libosal/task.h>
#include <libosal/types.h>
#include <libosal/mutex.h>
#include <libethercat/config.h>
#include <libethercat/pool.h>
#include <libethercat/datagram.h>
Go to the source code of this file.
Data Structures | |
struct | hw_common |
hardware structure More... | |
Macros | |
#define | container_of(ptr, type, member) |
#define | ETH_P_ECAT (0x88A4) |
Ethertype for EtherCAT. | |
#define | ETH_FRAME_LEN 0x1518 |
Typedefs | |
typedef enum pooltype | pooltype_t |
Flag to distinguish the pool types during processing. | |
typedef int(* | hw_device_recv_t) (struct hw_common *phw) |
Receive a frame from an EtherCAT hw device. | |
typedef int(* | hw_device_send_t) (struct hw_common *phw, ec_frame_t *pframe, pooltype_t pool_type) |
Send a frame from an EtherCAT hw device. | |
typedef void(* | hw_device_send_finished_t) (struct hw_common *phw) |
Doing internal stuff when finished sending frames. | |
typedef int(* | hw_device_get_tx_buffer_t) (struct hw_common *phw, ec_frame_t **ppframe) |
Get a free tx buffer from underlying hw device. | |
typedef int(* | hw_device_close_t) (struct hw_common *phw) |
Close hardware layer. | |
typedef struct hw_common | hw_common_t |
hardware structure | |
Enumerations | |
enum | pooltype { POOL_HIGH , POOL_LOW } |
Flag to distinguish the pool types during processing. | |
Functions | |
int | hw_open (struct hw_common *phw, struct ec *pec) |
open a new hw | |
int | hw_close (struct hw_common *phw) |
destroys a hw | |
int | hw_tx_low (struct hw_common *phw) |
start sending queued ethercat datagrams | |
int | hw_tx (struct hw_common *phw) |
start sending queued ethercat datagrams | |
void | hw_process_rx_frame (struct hw_common *phw, ec_frame_t *pframe) |
Process a received EtherCAT frame. | |
hardware access functions
#define container_of | ( | ptr, | |
type, | |||
member | |||
) |