mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
drivers: Implemented missing function in cc110x
Function cc110x_state_to_text is defined and (with ENABLE_DEBUG) referenced, but implemented. This commit adds the missing implementation.
This commit is contained in:
parent
b4f70be9ef
commit
cbff3e6d3a
@ -43,6 +43,25 @@
|
||||
#define ENABLE_DEBUG (0)
|
||||
#include "debug.h"
|
||||
|
||||
const char *cc110x_state_to_text(uint8_t state)
|
||||
{
|
||||
switch (state){
|
||||
case RADIO_IDLE:
|
||||
return "idle";
|
||||
case RADIO_TX_BUSY:
|
||||
return "tx busy";
|
||||
case RADIO_RX:
|
||||
return "rx";
|
||||
case RADIO_RX_BUSY:
|
||||
return "rx busy";
|
||||
case RADIO_PWD:
|
||||
return "pwd";
|
||||
case RADIO_UNKNOWN:
|
||||
return "unknown";
|
||||
}
|
||||
return "invalid";
|
||||
}
|
||||
|
||||
static void _rx_abort(cc110x_t *dev)
|
||||
{
|
||||
gpio_irq_disable(dev->params.gdo2);
|
||||
|
@ -35,7 +35,7 @@ extern "C" {
|
||||
* @{
|
||||
*/
|
||||
char *cc110x_get_marc_state(cc110x_t *dev);
|
||||
char *cc110x_state_to_text(uint8_t state);
|
||||
const char *cc110x_state_to_text(uint8_t state);
|
||||
int cc110x_rd_set_mode(cc110x_t *dev, int mode);
|
||||
uint8_t cc110x_get_buffer_pos(cc110x_t *dev);
|
||||
void cc110x_isr_handler(cc110x_t *dev, void(*callback)(void*), void*arg);
|
||||
|
Loading…
Reference in New Issue
Block a user