aboutsummaryrefslogtreecommitdiffstats
path: root/os/io/phy.h
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-09-25 15:30:24 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-09-25 15:30:24 +0000
commit34de3bf8d0c2fca3e3a99a419f8c8d641e6c3ad8 (patch)
treeb8529d73ad2b8155fd594f8235133bf1dc18b607 /os/io/phy.h
parent7c2813c27119ed1f3c9c433dc37583cc919d5a3f (diff)
downloadChibiOS-34de3bf8d0c2fca3e3a99a419f8c8d641e6c3ad8.tar.gz
ChibiOS-34de3bf8d0c2fca3e3a99a419f8c8d641e6c3ad8.tar.bz2
ChibiOS-34de3bf8d0c2fca3e3a99a419f8c8d641e6c3ad8.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1182 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/io/phy.h')
-rw-r--r--os/io/phy.h41
1 files changed, 24 insertions, 17 deletions
diff --git a/os/io/phy.h b/os/io/phy.h
index ffafa4025..e333b034d 100644
--- a/os/io/phy.h
+++ b/os/io/phy.h
@@ -31,27 +31,34 @@
#include "phy_lld.h"
/**
- * @brief Type of a PHY register value.
+ * @brief PHY Driver initialization.
*/
-typedef uint16_t phyreg_t;
+#define phyInit() phy_lld_init()
/**
- * @brief Type of a PHY register address.
+ * Resets a PHY device.
+ *
+ * @param[in] macp pointer to the @p MACDriver object
*/
-typedef uint8_t phyaddr_t;
-
-#ifdef __cplusplus
-extern "C" {
-#endif
- void phyInit(void);
- void phyReset(MACDriver *macp);
- void phyStart(MACDriver *macp);
- void phyStop(MACDriver *macp);
- phyreg_t phyGet(MACDriver *macp, phyaddr_t addr);
- void phyPut(MACDriver *macp, phyaddr_t addr, phyreg_t value);
-#ifdef __cplusplus
-}
-#endif
+#define phyReset(macp) phy_lld_reset(macp)
+
+/**
+ * @brief Reads a PHY register.
+ *
+ * @param[in] macp pointer to the @p MACDriver object
+ * @param addr the register address
+ * @return The register value.
+ */
+#define phyGet(macp, addr) phy_lld_get(macp, addr)
+
+/**
+ * @brief Writes a PHY register.
+ *
+ * @param[in] macp pointer to the @p MACDriver object
+ * @param addr the register address
+ * @param value the new register value
+ */
+#define phyPut(macp, addr, value) phy_lld_put(macp, addr, value)
#endif /* _PHY_H_ */