//
// eth_phy_dev.h
//
-// Device API for ethernet transciever (PHY) support
+// Device API for ethernet transceiver (PHY) support
//
//==========================================================================
//####ECOSGPLCOPYRIGHTBEGIN####
// Author(s): gthomas
// Contributors: gthomas
// Date: 2003-08-01
-// Purpose:
-// Description:
-//
+// Purpose:
+// Description:
+//
//####DESCRIPTIONEND####
//
//==========================================================================
#endif
// Transceiver mode
-#define PHY_BMCR 0x00 // Register number
-#define PHY_BMCR_RESET 0x8000
-#define PHY_BMCR_LOOPBACK 0x4000
-#define PHY_BMCR_100MB 0x2000
-#define PHY_BMCR_AUTO_NEG 0x1000
-#define PHY_BMCR_POWER_DOWN 0x0800
-#define PHY_BMCR_ISOLATE 0x0400
-#define PHY_BMCR_RESTART 0x0200
+#define PHY_BMCR 0x00 // Register number
+#define PHY_BMCR_RESET 0x8000
+#define PHY_BMCR_LOOPBACK 0x4000
+#define PHY_BMCR_100MB 0x2000
+#define PHY_BMCR_AUTO_NEG 0x1000
+#define PHY_BMCR_POWER_DOWN 0x0800
+#define PHY_BMCR_ISOLATE 0x0400
+#define PHY_BMCR_RESTART 0x0200
#define PHY_BMCR_FULL_DUPLEX 0x0100
-#define PHY_BMCR_COLL_TEST 0x0080
+#define PHY_BMCR_COLL_TEST 0x0080
-#define PHY_BMSR 0x01 // Status register
-#define PHY_BMSR_100T4 0x8000
-#define PHY_BMSR_100FDX 0x4000
-#define PHY_BMSR_100HDX 0x2000
-#define PHY_BMSR_10FDX 0x1000
-#define PHY_BMSR_10HDX 0x0800
-#define PHY_BMSR_AUTO_NEG 0x0020
-#define PHY_BMSR_LINK 0x0004
+#define PHY_BMSR 0x01 // Status register
+#define PHY_BMSR_100T4 0x8000
+#define PHY_BMSR_100FDX 0x4000
+#define PHY_BMSR_100HDX 0x2000
+#define PHY_BMSR_10FDX 0x1000
+#define PHY_BMSR_10HDX 0x0800
+#define PHY_BMSR_AUTO_NEG 0x0020
+#define PHY_BMSR_LINK 0x0004
-#define PHY_ID1 0x02 // Chip ID register (high 16 bits)
-#define PHY_ID2 0x03 // Chip ID register (low 16 bits)
+#define PHY_ID1 0x02 // Chip ID register (high 16 bits)
+#define PHY_ID2 0x03 // Chip ID register (low 16 bits)
-#define PHY_AN_ADV 0x04 // Auto negotiation advertisement register
-#define PHY_AN_ADV_10HDX 0x0020
-#define PHY_AN_ADV_10FDX 0x0040
-#define PHY_AN_ADV_100HDX 0x0080
-#define PHY_AN_ADV_100FDX 0x0100
-#define PHY_AN_ADV_100_T4 0x0200
+#define PHY_AN_ADV 0x04 // Auto negotiation advertisement register
+#define PHY_AN_ADV_10HDX 0x0020
+#define PHY_AN_ADV_10FDX 0x0040
+#define PHY_AN_ADV_100HDX 0x0080
+#define PHY_AN_ADV_100FDX 0x0100
+#define PHY_AN_ADV_100_T4 0x0200
-#define PHY_AN_PAR 0x05 // Auto negotiation link partner ability
-#define PHY_AN_PAR_10HDX 0x0020
-#define PHY_AN_PAR_10FDX 0x0040
-#define PHY_AN_PAR_100HDX 0x0080
-#define PHY_AN_PAR_100FDX 0x0100
-#define PHY_AN_PAR_100_T4 0x0200
+#define PHY_AN_PAR 0x05 // Auto negotiation link partner ability
+#define PHY_AN_PAR_10HDX 0x0020
+#define PHY_AN_PAR_10FDX 0x0040
+#define PHY_AN_PAR_100HDX 0x0080
+#define PHY_AN_PAR_100FDX 0x0100
+#define PHY_AN_PAR_100_T4 0x0200
struct _eth_phy_dev_entry {
- char *name;
- unsigned long id;
- bool (*stat)(eth_phy_access_t *f, int *stat);
+ char *name;
+ unsigned long id;
+ bool (*stat)(eth_phy_access_t *f, int *stat);
} CYG_HAL_TABLE_TYPE;
-#define _eth_phy_dev(_name_,_id_,_stat_) \
-struct _eth_phy_dev_entry _eth_phy_dev_##_id_ \
- CYG_HAL_TABLE_QUALIFIED_ENTRY(_eth_phy_devs,_id_) = \
- { _name_, _id_, _stat_ };
+#define _eth_phy_dev(_name_,_id_,_stat_) \
+ struct _eth_phy_dev_entry _eth_phy_dev_##_id_ \
+ CYG_HAL_TABLE_QUALIFIED_ENTRY(_eth_phy_devs,_id_) = \
+ { _name_, _id_, _stat_ };
#endif // CYGONCE_DEVS_ETH_PHY_DEV_H_
// ------------------------------------------------------------------------