equal
deleted
inserted
replaced
49 |
49 |
50 /** Finite state machines for the CANopen-over-EtherCAT protocol. |
50 /** Finite state machines for the CANopen-over-EtherCAT protocol. |
51 */ |
51 */ |
52 struct ec_fsm_foe { |
52 struct ec_fsm_foe { |
53 ec_slave_t *slave; /**< slave the FSM runs on */ |
53 ec_slave_t *slave; /**< slave the FSM runs on */ |
54 ec_datagram_t *datagram; /**< datagram used in the state machine */ |
54 ec_mailbox_t *mbox; /**< mailbox used in the state machine */ |
55 unsigned int retries; /**< retries upon datagram timeout */ |
55 unsigned int retries; /**< retries upon datagram timeout */ |
56 |
56 |
57 void (*state)(ec_fsm_foe_t *); /**< FoE state function */ |
57 void (*state)(ec_fsm_foe_t *); /**< FoE state function */ |
58 unsigned long jiffies_start; /**< FoE timestamp. */ |
58 unsigned long jiffies_start; /**< FoE timestamp. */ |
59 uint8_t subindex; /**< current subindex */ |
59 uint8_t subindex; /**< current subindex */ |
78 uint32_t rx_filename_len; /**< Length of the receive file name. */ |
78 uint32_t rx_filename_len; /**< Length of the receive file name. */ |
79 }; |
79 }; |
80 |
80 |
81 /*****************************************************************************/ |
81 /*****************************************************************************/ |
82 |
82 |
83 void ec_fsm_foe_init(ec_fsm_foe_t *, ec_datagram_t *); |
83 void ec_fsm_foe_init(ec_fsm_foe_t *, ec_mailbox_t *); |
84 void ec_fsm_foe_clear(ec_fsm_foe_t *); |
84 void ec_fsm_foe_clear(ec_fsm_foe_t *); |
85 |
85 |
86 int ec_fsm_foe_exec(ec_fsm_foe_t *); |
86 int ec_fsm_foe_exec(ec_fsm_foe_t *); |
87 int ec_fsm_foe_success(ec_fsm_foe_t *); |
87 int ec_fsm_foe_success(ec_fsm_foe_t *); |
88 |
88 |