|
#define | ETH_P_ECAT (0x88A4) |
| Ethertype for EtherCAT.
|
|
#define | ETH_FRAME_LEN 0x1518 |
|
|
enum | pooltype { POOL_HIGH
, POOL_LOW
} |
| Flag to distinguish the pool types during processing.
|
|
This modules contains main EtherCAT hardware functions.
◆ hw_common_t
hardware structure
Hardware struct type.
◆ hw_device_close_t
typedef int(* hw_device_close_t) (struct hw_common *phw) |
Close hardware layer.
- Parameters
-
[in] | phw | Pointer to hw handle. |
- Returns
- 0 or negative error code
◆ hw_device_get_tx_buffer_t
Get a free tx buffer from underlying hw device.
- Parameters
-
[in] | phw | Pointer to hw handle. |
[in] | ppframe | Pointer to return frame buffer pointer. |
- Returns
- 0 or negative error code
◆ hw_device_recv_t
typedef int(* hw_device_recv_t) (struct hw_common *phw) |
Receive a frame from an EtherCAT hw device.
- Parameters
-
[in] | phw | Pointer to hw handle. |
- Returns
- 0 or negative error code
◆ hw_device_send_finished_t
typedef void(* hw_device_send_finished_t) (struct hw_common *phw) |
Doing internal stuff when finished sending frames.
- Parameters
-
[in] | phw | Pointer to hw handle. |
◆ hw_device_send_t
Send a frame from an EtherCAT hw device.
- Parameters
-
[in] | phw | Pointer to hw handle. |
[in] | pframe | Pointer to frame buffer. |
[in] | pool_type | Pool type to distinguish between high and low prio frames. |
- Returns
- 0 or negative error code
◆ pooltype_t
Flag to distinguish the pool types during processing.
pool type struct type.
◆ hw_close()
destroys a hw
- Parameters
-
- Returns
- 0 or negative error code
◆ hw_open()
int hw_open |
( |
struct hw_common * |
phw, |
|
|
struct ec * |
pec |
|
) |
| |
open a new hw
- Parameters
-
[in] | phw | Pointer to hw structure. |
[in] | pec | Pointer to master structure. |
- Returns
- 0 or negative error code
◆ hw_process_rx_frame()
Process a received EtherCAT frame.
- Parameters
-
[in] | phw | Pointer to hw handle. |
[in] | pframe | Pointer to received EtherCAT frame. |
◆ hw_tx()
start sending queued ethercat datagrams
- Parameters
-
- Returns
- 0 or error code
◆ hw_tx_low()
start sending queued ethercat datagrams
- Parameters
-
- Returns
- 0 or error code