ieee802.15.4 radio: Remove interface methods that duplicate IOCTL commands.
This commit is contained in:
parent
fae1df31dc
commit
6b8a8bda35
@ -148,7 +148,7 @@ static void at86rf23x_irqwork_tx(FAR struct at86rf23x_dev_s *dev);
|
||||
static void at86rf23x_irqworker(FAR void *arg);
|
||||
static int at86rf23x_interrupt(int irq, FAR void *context, FAR void *arg);
|
||||
|
||||
/* Driver operations */
|
||||
/* IOCTL helpers */
|
||||
|
||||
static int at86rf23x_setchannel(FAR struct ieee802154_radio_s *ieee,
|
||||
uint8_t chan);
|
||||
@ -182,10 +182,13 @@ static int at86rf23x_setcca(FAR struct ieee802154_radio_s *ieee,
|
||||
FAR struct ieee802154_cca_s *cca);
|
||||
static int at86rf23x_getcca(FAR struct ieee802154_radio_s *ieee,
|
||||
FAR struct ieee802154_cca_s *cca);
|
||||
static int at86rf23x_ioctl(FAR struct ieee802154_radio_s *ieee, int cmd,
|
||||
unsigned long arg);
|
||||
static int at86rf23x_energydetect(FAR struct ieee802154_radio_s *ieee,
|
||||
FAR uint8_t *energy);
|
||||
|
||||
/* Driver operations */
|
||||
|
||||
static int at86rf23x_ioctl(FAR struct ieee802154_radio_s *ieee, int cmd,
|
||||
unsigned long arg);
|
||||
static int at86rf23x_rxenable(FAR struct ieee802154_radio_s *ieee,
|
||||
bool state, FAR struct ieee802154_packet_s *packet);
|
||||
static int at86rf23x_transmit(FAR struct ieee802154_radio_s *ieee,
|
||||
@ -206,24 +209,7 @@ static struct at86rf23x_dev_s g_at86rf23x_devices[1];
|
||||
|
||||
static const struct ieee802154_radioops_s at86rf23x_devops =
|
||||
{
|
||||
.setchannel = at86rf23x_setchannel,
|
||||
.getchannel = at86rf23x_getchannel,
|
||||
.setpanid = at86rf23x_setpanid,
|
||||
.getpanid = at86rf23x_getpanid,
|
||||
.setsaddr = at86rf23x_setsaddr,
|
||||
.getsaddr = at86rf23x_getsaddr,
|
||||
.seteaddr = at86rf23x_seteaddr,
|
||||
.geteaddr = at86rf23x_geteaddr,
|
||||
.setpromisc = at86rf23x_setpromisc,
|
||||
.getpromisc = at86rf23x_getpromisc,
|
||||
.setdevmode = at86rf23x_setdevmode,
|
||||
.getdevmode = at86rf23x_getdevmode,
|
||||
.settxpower = at86rf23x_settxpower,
|
||||
.gettxpower = at86rf23x_gettxpower,
|
||||
.setcca = at86rf23x_setcca,
|
||||
.getcca = at86rf23x_getcca,
|
||||
.ioctl = at86rf23x_ioctl,
|
||||
.energydetect = at86rf23x_energydetect,
|
||||
.rxenable = at86rf23x_rxenable,
|
||||
.transmit = at86rf23x_transmit
|
||||
};
|
||||
@ -1143,6 +1129,24 @@ static int at86rf23x_getcca(FAR struct ieee802154_radio_s *ieee,
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: at86rf23x_energydetect
|
||||
*
|
||||
* Description:
|
||||
* Perform energy detection scan. TODO: Need to implement.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static int at86rf23x_energydetect(FAR struct ieee802154_radio_s *ieee,
|
||||
FAR uint8_t *energy)
|
||||
{
|
||||
#warning at86rf23x_energydetect not implemented.
|
||||
|
||||
/* Not yet implemented */
|
||||
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: at86rf23x_ioctl
|
||||
*
|
||||
@ -1237,23 +1241,6 @@ static int at86rf23x_ioctl(FAR struct ieee802154_radio_s *ieee, int cmd,
|
||||
}
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: at86rf23x_energydetect
|
||||
*
|
||||
* Description:
|
||||
* Perform energy detection scan. TODO: Need to implement.
|
||||
*
|
||||
****************************************************************************/
|
||||
static int at86rf23x_energydetect(FAR struct ieee802154_radio_s *ieee,
|
||||
FAR uint8_t *energy)
|
||||
{
|
||||
#warning at86rf23x_energydetect not implemented.
|
||||
|
||||
/* Not yet implemented */
|
||||
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: at86rf23x_initialize
|
||||
*
|
||||
|
@ -140,7 +140,7 @@ static void mrf24j40_irqwork_tx(FAR struct mrf24j40_radio_s *dev);
|
||||
static void mrf24j40_irqworker(FAR void *arg);
|
||||
static int mrf24j40_interrupt(int irq, FAR void *context, FAR void *arg);
|
||||
|
||||
/* Driver operations */
|
||||
/* IOCTL helpers */
|
||||
|
||||
static int mrf24j40_setchannel(FAR struct ieee802154_radio_s *ieee,
|
||||
uint8_t chan);
|
||||
@ -174,10 +174,13 @@ static int mrf24j40_setcca(FAR struct ieee802154_radio_s *ieee,
|
||||
FAR struct ieee802154_cca_s *cca);
|
||||
static int mrf24j40_getcca(FAR struct ieee802154_radio_s *ieee,
|
||||
FAR struct ieee802154_cca_s *cca);
|
||||
static int mrf24j40_ioctl(FAR struct ieee802154_radio_s *ieee, int cmd,
|
||||
unsigned long arg);
|
||||
static int mrf24j40_energydetect(FAR struct ieee802154_radio_s *ieee,
|
||||
FAR uint8_t *energy);
|
||||
|
||||
/* Driver operations */
|
||||
|
||||
static int mrf24j40_ioctl(FAR struct ieee802154_radio_s *ieee, int cmd,
|
||||
unsigned long arg);
|
||||
static int mrf24j40_rxenable(FAR struct ieee802154_radio_s *ieee,
|
||||
bool state, FAR struct ieee802154_packet_s *packet);
|
||||
static int mrf24j40_transmit(FAR struct ieee802154_radio_s *ieee,
|
||||
@ -198,16 +201,7 @@ static struct mrf24j40_radio_s g_mrf24j40_devices[1];
|
||||
|
||||
static const struct ieee802154_radioops_s mrf24j40_devops =
|
||||
{
|
||||
mrf24j40_setchannel, mrf24j40_getchannel,
|
||||
mrf24j40_setpanid , mrf24j40_getpanid,
|
||||
mrf24j40_setsaddr , mrf24j40_getsaddr,
|
||||
mrf24j40_seteaddr , mrf24j40_geteaddr,
|
||||
mrf24j40_setpromisc, mrf24j40_getpromisc,
|
||||
mrf24j40_setdevmode, mrf24j40_getdevmode,
|
||||
mrf24j40_settxpower, mrf24j40_gettxpower,
|
||||
mrf24j40_setcca , mrf24j40_getcca,
|
||||
mrf24j40_ioctl,
|
||||
mrf24j40_energydetect,
|
||||
mrf24j40_rxenable,
|
||||
mrf24j40_transmit
|
||||
};
|
||||
|
@ -178,47 +178,8 @@ struct ieee802154_radio_s;
|
||||
|
||||
struct ieee802154_radioops_s
|
||||
{
|
||||
CODE int (*setchannel)(FAR struct ieee802154_radio_s *dev,
|
||||
uint8_t channel);
|
||||
CODE int (*getchannel)(FAR struct ieee802154_radio_s *dev,
|
||||
FAR uint8_t *channel);
|
||||
|
||||
CODE int (*setpanid)(FAR struct ieee802154_radio_s *dev, uint16_t panid);
|
||||
CODE int (*getpanid)(FAR struct ieee802154_radio_s *dev,
|
||||
FAR uint16_t *panid);
|
||||
|
||||
CODE int (*setsaddr)(FAR struct ieee802154_radio_s *dev, uint16_t saddr);
|
||||
CODE int (*getsaddr)(FAR struct ieee802154_radio_s *dev,
|
||||
FAR uint16_t *saddr);
|
||||
|
||||
CODE int (*seteaddr)(FAR struct ieee802154_radio_s *dev,
|
||||
FAR uint8_t *laddr);
|
||||
CODE int (*geteaddr)(FAR struct ieee802154_radio_s *dev,
|
||||
FAR uint8_t *laddr);
|
||||
|
||||
CODE int (*setpromisc)(FAR struct ieee802154_radio_s *dev, bool promisc);
|
||||
CODE int (*getpromisc)(FAR struct ieee802154_radio_s *dev,
|
||||
FAR bool *promisc);
|
||||
|
||||
CODE int (*setdevmode)(FAR struct ieee802154_radio_s *dev,
|
||||
uint8_t devmode);
|
||||
CODE int (*getdevmode)(FAR struct ieee802154_radio_s *dev,
|
||||
FAR uint8_t *devmode);
|
||||
|
||||
CODE int (*settxpower)(FAR struct ieee802154_radio_s *dev,
|
||||
int32_t txpwr); /* unit = 1 mBm = 1/100 dBm */
|
||||
CODE int (*gettxpower)(FAR struct ieee802154_radio_s *dev,
|
||||
FAR int32_t *txpwr);
|
||||
|
||||
CODE int (*setcca)(FAR struct ieee802154_radio_s *dev,
|
||||
FAR struct ieee802154_cca_s *cca);
|
||||
CODE int (*getcca)(FAR struct ieee802154_radio_s *dev,
|
||||
FAR struct ieee802154_cca_s *cca);
|
||||
|
||||
CODE int (*ioctl)(FAR struct ieee802154_radio_s *ieee, int cmd,
|
||||
unsigned long arg);
|
||||
CODE int (*energydetect)(FAR struct ieee802154_radio_s *dev,
|
||||
FAR uint8_t *energy);
|
||||
CODE int (*rxenable)(FAR struct ieee802154_radio_s *dev, bool state,
|
||||
FAR struct ieee802154_packet_s *packet);
|
||||
CODE int (*transmit)(FAR struct ieee802154_radio_s *dev,
|
||||
|
Loading…
Reference in New Issue
Block a user