mirror of
https://github.com/apache/nuttx.git
synced 2026-06-05 07:12:54 +08:00
Clicker2-STM32: Add some mostly bogus MAC initializatinon logic.
This commit is contained in:
@@ -524,6 +524,19 @@ static int mac802154_rsporphan(FAR struct ieee802154_mac_s *mac,
|
||||
*
|
||||
* Description:
|
||||
* Create a 802.15.4 MAC device from a 802.15.4 compatible radio device.
|
||||
* To create a 802.15.4 MAC, you need to pass:
|
||||
*
|
||||
* - an instance of a radio driver in radiodev
|
||||
* - a pointer to a structure that contains MAC callback routines to
|
||||
* handle confirmations and indications. NULL entries indicate no
|
||||
* callback.
|
||||
*
|
||||
* In return you get a mac structure that has pointers to MAC operations
|
||||
* and responses.
|
||||
*
|
||||
* This API does not create any device accessible to userspace. If you
|
||||
* want to call these APIs from userspace, you have to wrap your mac in a
|
||||
* character device via mac802154_device.c.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
@@ -537,7 +550,8 @@ FAR struct ieee802154_mac_s *
|
||||
|
||||
mac = (FAR struct ieee802154_privmac_s *)
|
||||
kmm_zalloc(sizeof(struct ieee802154_privmac_s));
|
||||
if(!mac)
|
||||
|
||||
if (mac == NULL)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
@@ -546,7 +560,9 @@ FAR struct ieee802154_mac_s *
|
||||
|
||||
mac->pubmac.radio = radiodev;
|
||||
mac->pubmac.ops = mac802154ops;
|
||||
|
||||
mac802154_defaultmib(mac);
|
||||
mac802154_applymib(mac);
|
||||
|
||||
return &mac->pubmac;
|
||||
}
|
||||
|
||||
@@ -487,7 +487,8 @@ static int radio802154dev_ioctl(FAR struct file *filep, int cmd,
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int radio802154dev_register(FAR struct ieee802154_radio_s *radio, FAR char *devname)
|
||||
int radio802154dev_register(FAR struct ieee802154_radio_s *radio,
|
||||
FAR char *devname)
|
||||
{
|
||||
FAR struct radio802154_devwrapper_s *dev;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user