drivers/ieee802154: Adapt cc1200 driver to new GPIO API

Update to use new API for GPIO pin configuration and operation.  Fix
invalid arithmetic on void pointer.  Convert to support devicetree.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
This commit is contained in:
Tomasz Bursztyka 2020-01-27 15:29:13 +01:00 committed by Carles Cufí
commit 62b2cae2ae
4 changed files with 69 additions and 55 deletions

View file

@ -17,7 +17,7 @@
* extended address 0x00 to 0x39 included
*
* If CONFIG_IEEE802154_CC1200_RF_PRESET is not used, one will need
* no provide 'cc1200_rf_settings' with proper settings. These can
* to provide 'cc1200_rf_settings' with proper settings. These can
* be generated through TI's SmartRF application.
*
*/
@ -35,25 +35,4 @@ struct cc1200_rf_registers_set {
extern const struct cc1200_rf_registers_set cc1200_rf_settings;
#endif
/* Note for EMK & EM adapter booster pack users:
* SPI pins are easy, RESET as well, but when it comes to GPIO:
* CHIP -> EM adapter
* GPIO0 -> GPIOA
* GPIO1 -> reserved (it's SPI MISO)
* GPIO2 -> GPIOB
* GPIO3 -> GPIO3
*/
enum cc1200_gpio_index {
CC1200_GPIO_IDX_GPIO0,
CC1200_GPIO_IDX_MAX,
};
struct cc1200_gpio_configuration {
struct device *dev;
u32_t pin;
};
struct cc1200_gpio_configuration *cc1200_configure_gpios(void);
#endif /* ZEPHYR_INCLUDE_DRIVERS_IEEE802154_CC1200_H_ */