- EthIntf: checking line status on enabling an interface added
- IODef: llTrigLinkChg added
This commit is contained in:
parent
bb7a8e1f16
commit
db50beb71a
@ -212,7 +212,10 @@ bool ethinf_get_link_state(EthInterface *intf) {
|
|||||||
void ethinf_up(EthInterface *intf) {
|
void ethinf_up(EthInterface *intf) {
|
||||||
intf->up = true;
|
intf->up = true;
|
||||||
|
|
||||||
// TODO: check PHY link state
|
// trigger a link change interrupt to query link state
|
||||||
|
if (intf->ioDef->llTrigLinkChg != NULL) {
|
||||||
|
intf->ioDef->llTrigLinkChg(intf->ioDef);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ethinf_down(EthInterface *intf) {
|
void ethinf_down(EthInterface *intf) {
|
||||||
|
@ -22,6 +22,7 @@ typedef struct EthIODef_ {
|
|||||||
int (*llTxTrigger)(struct EthIODef_ *io, MsgQueue *mq); ///< Function pointer to low-level transmit function trigger
|
int (*llTxTrigger)(struct EthIODef_ *io, MsgQueue *mq); ///< Function pointer to low-level transmit function trigger
|
||||||
int (*llTxDone)(struct EthIODef_ *io, const RawPckt *rawPckt); ///< Transmission done (interrupt) callback
|
int (*llTxDone)(struct EthIODef_ *io, const RawPckt *rawPckt); ///< Transmission done (interrupt) callback
|
||||||
int (*llLinkChg)(struct EthIODef_ *io, int linkState, uint16_t speed, bool duplex); ///< Link change interrupt
|
int (*llLinkChg)(struct EthIODef_ *io, int linkState, uint16_t speed, bool duplex); ///< Link change interrupt
|
||||||
|
int (*llTrigLinkChg)(struct EthIODef_ *io); ///< Trigger a link change interrupt callback
|
||||||
int (*llRxStore)(struct EthIODef_ *io, const RawPckt *rawPckt); ///< Receive done callback
|
int (*llRxStore)(struct EthIODef_ *io, const RawPckt *rawPckt); ///< Receive done callback
|
||||||
int (*llError)(struct EthIODef_ *io, int error); ///< Low-level error interrupt
|
int (*llError)(struct EthIODef_ *io, int error); ///< Low-level error interrupt
|
||||||
int (*llRxRead)(struct EthIODef_ *io); ///< Read received packets
|
int (*llRxRead)(struct EthIODef_ *io); ///< Read received packets
|
||||||
|
Loading…
x
Reference in New Issue
Block a user