drivers/ieee802154: Adapt cc2520 driver to new GPIO API
Update to use new API for GPIO pin configuration and operation. Fix invalid arithmetic on void pointer. Mark all CC2520 GPIOs as required in binding. Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com> Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
This commit is contained in:
parent
4046de5cae
commit
3587fe2fe3
4 changed files with 116 additions and 68 deletions
|
@ -1,30 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) 2016 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#ifndef ZEPHYR_INCLUDE_DRIVERS_IEEE802154_CC2520_H_
|
||||
#define ZEPHYR_INCLUDE_DRIVERS_IEEE802154_CC2520_H_
|
||||
|
||||
#include <device.h>
|
||||
|
||||
enum cc2520_gpio_index {
|
||||
CC2520_GPIO_IDX_VREG_EN = 0,
|
||||
CC2520_GPIO_IDX_RESET,
|
||||
CC2520_GPIO_IDX_FIFO,
|
||||
CC2520_GPIO_IDX_CCA,
|
||||
CC2520_GPIO_IDX_SFD,
|
||||
CC2520_GPIO_IDX_FIFOP,
|
||||
|
||||
CC2520_GPIO_IDX_MAX,
|
||||
};
|
||||
|
||||
struct cc2520_gpio_configuration {
|
||||
struct device *dev;
|
||||
u32_t pin;
|
||||
};
|
||||
|
||||
struct cc2520_gpio_configuration *cc2520_configure_gpios(void);
|
||||
|
||||
#endif /* ZEPHYR_INCLUDE_DRIVERS_IEEE802154_CC2520_H_ */
|
Loading…
Add table
Add a link
Reference in a new issue