mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-29 00:11:16 +01:00
cc110x: cleanup cc110x_legacy_csma driver
Remove unused radio_t struct and fixed documentation.
This commit is contained in:
parent
da3377bf6d
commit
67a2b37ff8
@ -97,21 +97,6 @@ volatile cc1100_flags rflags; ///< Radio control flags
|
||||
static uint8_t radio_address; ///< Radio address
|
||||
static uint8_t radio_channel; ///< Radio channel number
|
||||
|
||||
const radio_t radio_cc1100 = { ///< Radio driver API
|
||||
"CC1100",
|
||||
CC1100_BROADCAST_ADDRESS,
|
||||
MAX_OUTPUT_POWER,
|
||||
cc1100_get_avg_transmission_duration,
|
||||
cc1100_get_address,
|
||||
cc1100_set_address,
|
||||
cc1100_set_output_power,
|
||||
cc1100_set_packet_monitor,
|
||||
cc1100_set_packet_handler,
|
||||
cc1100_send_csmaca,
|
||||
cc1100_print_statistic,
|
||||
cc1100_print_config
|
||||
};
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
// Data structures for mode control
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -56,8 +56,6 @@ extern "C" {
|
||||
#define CC1100_RADIO_MODE CC1100_MODE_CONSTANT_RX
|
||||
#endif
|
||||
|
||||
/// CC1100 radio interface
|
||||
extern const radio_t radio_cc1100;
|
||||
|
||||
/**
|
||||
* @brief Initialize radio layer.
|
||||
|
||||
@ -28,9 +28,7 @@
|
||||
*
|
||||
* @author baar
|
||||
* @author Thomas Hillebrandt <hillebra@inf.fu-berlin.de>
|
||||
* @version $Revision: 1961 $
|
||||
*
|
||||
* @note $Id$
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
@ -41,40 +39,15 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define L1_PROTOCOL_CATCH_ALL (0xff) ///< Catch all protocol ID
|
||||
|
||||
enum layer_1_protocols {
|
||||
LAYER_1_PROTOCOL_LL_ACK = 1, ///< Link-Level Acknowledgement (LL-ACK)
|
||||
LAYER_1_PROTOCOL_MM = 2, ///< Micro Mesh network packet (MM)
|
||||
};
|
||||
#define L1_PROTOCOL_CATCH_ALL (0xff) /**< Catch all protocol ID */
|
||||
|
||||
/**
|
||||
* Radio/MAC API.
|
||||
* @brief Link layer protocols (sic!) for proprietary cc110x protocol stack
|
||||
*/
|
||||
typedef struct {
|
||||
const char *name;
|
||||
const radio_address_t broadcast_address;
|
||||
const uint8_t output_power_max;
|
||||
/**
|
||||
* @return the average transmission duration of one packet
|
||||
* in milliseconds, e.g. till ACK received.
|
||||
*/
|
||||
int (*get_avg_transmission_duration)(void);
|
||||
radio_address_t (*get_address)(void);
|
||||
bool (*set_address)(radio_address_t address);
|
||||
bool (*set_output_power)(uint8_t pa_idx);
|
||||
bool (*set_packet_monitor)(packet_monitor_t monitor);
|
||||
/**
|
||||
* @return -1 if an error occurs (e.g. handler table full) else >= 0.
|
||||
*/
|
||||
int (*set_packet_handler)(protocol_t protocol, packet_handler_t handler);
|
||||
/**
|
||||
* @return A negative value if operation failed; else the number of transmitted bytes.
|
||||
*/
|
||||
int (*send)(radio_address_t address, protocol_t protocol, int priority, char *payload, int payload_len);
|
||||
void (*print_stats)(void);
|
||||
void (*print_config)(void);
|
||||
} radio_t;
|
||||
enum layer_1_protocols {
|
||||
LAYER_1_PROTOCOL_LL_ACK = 1, /**< Link-Level Acknowledgement (LL-ACK) */
|
||||
LAYER_1_PROTOCOL_MM = 2, /**< Micro Mesh network packet (MM) */
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user