diff options
Diffstat (limited to 'os/io/templates')
-rw-r--r-- | os/io/templates/mac_lld.c | 26 | ||||
-rw-r--r-- | os/io/templates/mac_lld.h | 29 |
2 files changed, 41 insertions, 14 deletions
diff --git a/os/io/templates/mac_lld.c b/os/io/templates/mac_lld.c index 98c6f0c1d..100f871d2 100644 --- a/os/io/templates/mac_lld.c +++ b/os/io/templates/mac_lld.c @@ -37,6 +37,7 @@ void mac_lld_init(void) { /**
* @brief Low level MAC address setup.
*
+ * @param[in] macp pointer to the @p MACDriver object
* @param[in] p pointer to a six bytes buffer containing the MAC address. If
* this parameter is set to @p NULL then a system default MAC is
* used.
@@ -44,21 +45,25 @@ void mac_lld_init(void) { * @note This function should be invoked after the @p macInit() and before
* @p macStart() else the result is unspecified (performed or ignored).
*/
-void mac_lld_set_address(uint8_t *p) {
+void mac_lld_set_address(MACDriver *macp, uint8_t *p) {
}
/**
* @brief Starts the I/O activity and enters a low power mode.
+ *
+ * @param[in] macp pointer to the @p MACDriver object
*/
-void mac_lld_start(void) {
+void mac_lld_start(MACDriver *macp) {
}
/**
* @brief Stops the I/O activity.
+ *
+ * @param[in] macp pointer to the @p MACDriver object
*/
-void mac_lld_stop(void) {
+void mac_lld_stop(MACDriver *macp) {
}
@@ -67,10 +72,11 @@ void mac_lld_stop(void) { * @details One of the available transmission descriptors is locked and
* returned.
*
+ * @param[in] macp pointer to the @p MACDriver object
* @return A pointer to a @p MACTransmitDescriptor structure or @p NULL if
* a descriptor is not available or the driver went in stop mode.
*/
-MACTransmitDescriptor *max_lld_get_transmit_descriptor(void) {
+MACTransmitDescriptor *max_lld_get_transmit_descriptor(MACDriver *macp) {
return NULL;
}
@@ -79,9 +85,11 @@ MACTransmitDescriptor *max_lld_get_transmit_descriptor(void) { * @brief Releases a transmit descriptor and starts the transmission of the
* enqueued data as a single frame.
*
+ * @param[in] macp pointer to the @p MACDriver object
* @param[in] tdp the pointer to the @p MACTransmitDescriptor structure
*/
-void mac_lld_release_transmit_descriptor(MACTransmitDescriptor *tdp) {
+void mac_lld_release_transmit_descriptor(MACDriver *macp,
+ MACTransmitDescriptor *tdp) {
}
@@ -99,11 +107,12 @@ uint8_t *mac_lld_get_transmit_buffer(MACTransmitDescriptor *tdp) { /**
* @brief Returns a received frame.
*
+ * @param[in] macp pointer to the @p MACDriver object
* @return A pointer to a @p MACReceiveDescriptor structure or @p NULL if
* the operation timed out, the driver went in stop mode or some
* transient error happened.
*/
-MACReceiveDescriptor *max_lld_get_receive_descriptor(void) {
+MACReceiveDescriptor *max_lld_get_receive_descriptor(MACDriver *macp) {
return NULL;
}
@@ -113,9 +122,11 @@ MACReceiveDescriptor *max_lld_get_receive_descriptor(void) { * @details The descriptor and its buffer is made available for more incoming
* frames.
*
+ * @param[in] macp pointer to the @p MACDriver object
* @param[in] rdp the pointer to the @p MACReceiveDescriptor structure
*/
-void mac_lld_release_receive_descriptor(MACReceiveDescriptor *rdp) {
+void mac_lld_release_receive_descriptor(MACDriver *macp,
+ MACReceiveDescriptor *rdp) {
}
@@ -127,6 +138,7 @@ void mac_lld_release_receive_descriptor(MACReceiveDescriptor *rdp) { */
uint8_t *mac_lld_get_receive_buffer(MACReceiveDescriptor *rdp) {
+ return NULL;
}
/** @} */
diff --git a/os/io/templates/mac_lld.h b/os/io/templates/mac_lld.h index 92e23cc4e..01889aa12 100644 --- a/os/io/templates/mac_lld.h +++ b/os/io/templates/mac_lld.h @@ -42,10 +42,23 @@ /* Driver data structures and types. */
/*===========================================================================*/
+/**
+ * @brief Structure representing a MAC driver.
+ */
+typedef struct {
+
+} MACDriver;
+
+/**
+ * @brief Structure representing a transmission descriptor.
+ */
typedef struct {
} MACTransmitDescriptor;
+/**
+ * @brief Structure representing a receive descriptor.
+ */
typedef struct {
} MACReceiveDescriptor;
@@ -58,14 +71,16 @@ typedef struct { extern "C" {
#endif
void mac_lld_init(void);
- void mac_lld_set_address(uint8_t *p);
- void mac_lld_start(void);
- void mac_lld_stop(void);
- MACTransmitDescriptor *max_lld_get_transmit_descriptor(void);
- void mac_lld_release_transmit_descriptor(MACTransmitDescriptor *tdp);
+ void mac_lld_set_address(MACDriver *macp, uint8_t *p);
+ void mac_lld_start(MACDriver *macp);
+ void mac_lld_stop(MACDriver *macp);
+ MACTransmitDescriptor *max_lld_get_transmit_descriptor(MACDriver *macp);
+ void mac_lld_release_transmit_descriptor(MACDriver *macp,
+ MACTransmitDescriptor *tdp);
uint8_t *mac_lld_get_transmit_buffer(MACTransmitDescriptor *tdp);
- MACReceiveDescriptor *max_lld_get_receive_descriptor(void);
- void mac_lld_release_receive_descriptor(MACReceiveDescriptor *rdp);
+ MACReceiveDescriptor *max_lld_get_receive_descriptor(MACDriver *macp);
+ void mac_lld_release_receive_descriptor(MACDriver *macp,
+ MACReceiveDescriptor *rdp);
uint8_t *mac_lld_get_receive_buffer(MACReceiveDescriptor *rdp);
#ifdef __cplusplus
}
|