diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2009-09-27 12:00:29 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2009-09-27 12:00:29 +0000 |
commit | 38c94f357079127077ad92a1f115081474f69db3 (patch) | |
tree | 25658c8d52c9ed0d7707d0572096748c9896e839 /os/io/templates | |
parent | aee118ec3bf99ba1af94bdf321c91d91553e9835 (diff) | |
download | ChibiOS-38c94f357079127077ad92a1f115081474f69db3.tar.gz ChibiOS-38c94f357079127077ad92a1f115081474f69db3.tar.bz2 ChibiOS-38c94f357079127077ad92a1f115081474f69db3.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1186 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/io/templates')
-rw-r--r-- | os/io/templates/mac_lld.c | 34 | ||||
-rw-r--r-- | os/io/templates/mac_lld.h | 10 |
2 files changed, 12 insertions, 32 deletions
diff --git a/os/io/templates/mac_lld.c b/os/io/templates/mac_lld.c index 8dc674fcb..45b3e0b50 100644 --- a/os/io/templates/mac_lld.c +++ b/os/io/templates/mac_lld.c @@ -41,42 +41,23 @@ void mac_lld_init(void) { * @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.
- *
- * @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(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(MACDriver *macp) {
-
-}
-
-/**
- * @brief Stops the I/O activity.
- *
- * @param[in] macp pointer to the @p MACDriver object
- */
-void mac_lld_stop(MACDriver *macp) {
-
-}
-
-/**
* @brief Returns a transmission descriptor.
* @details One of the available transmission descriptors is locked and
* returned.
*
* @param[in] macp pointer to the @p MACDriver object
+ * @param[in] size size of the frame to be transmitted
* @return A pointer to a @p MACTransmitDescriptor structure or @p NULL if
- * a descriptor is not available or the driver went in stop mode.
+ * a descriptor is not available.
*/
-MACTransmitDescriptor *max_lld_get_transmit_descriptor(MACDriver *macp) {
+MACTransmitDescriptor *max_lld_get_transmit_descriptor(MACDriver *macp,
+ size_t size) {
return NULL;
}
@@ -108,11 +89,12 @@ uint8_t *mac_lld_get_transmit_buffer(MACTransmitDescriptor *tdp) { * @brief Returns a received frame.
*
* @param[in] macp pointer to the @p MACDriver object
+ * @param[out szp size of the received frame
* @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.
+ * the operation timed out or some transient error happened.
*/
-MACReceiveDescriptor *max_lld_get_receive_descriptor(MACDriver *macp) {
+MACReceiveDescriptor *max_lld_get_receive_descriptor(MACDriver *macp,
+ size_t *szp) {
return NULL;
}
diff --git a/os/io/templates/mac_lld.h b/os/io/templates/mac_lld.h index 0ded4b690..3ab322b5c 100644 --- a/os/io/templates/mac_lld.h +++ b/os/io/templates/mac_lld.h @@ -46,8 +46,6 @@ * @brief Structure representing a MAC driver.
*/
typedef struct {
- enum {ifStopped = 0,
- ifStarted} md_state; /**< @brief Interface status.*/
Semaphore md_tdsem; /**< Transmit semaphore.*/
Semaphore md_rdsem; /**< Receive semaphore.*/
} MACDriver;
@@ -75,13 +73,13 @@ extern "C" { #endif
void mac_lld_init(void);
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);
+ MACTransmitDescriptor *max_lld_get_transmit_descriptor(MACDriver *macp,
+ size_t size);
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(MACDriver *macp);
+ MACReceiveDescriptor *max_lld_get_receive_descriptor(MACDriver *macp,
+ size_t *szp);
void mac_lld_release_receive_descriptor(MACDriver *macp,
MACReceiveDescriptor *rdp);
uint8_t *mac_lld_get_receive_buffer(MACReceiveDescriptor *rdp);
|