samples: bluetooth: Convert to new DT_INST macros
Convert older DT_INST_ macro use the new include/devicetree.h DT_INST macro APIs. Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
parent
3d2eb34e8e
commit
7a0ee9d3cb
|
@ -48,8 +48,8 @@ LOG_MODULE_REGISTER(LOG_MODULE_NAME);
|
|||
#define PACKET_TYPE 0
|
||||
#define EVT_BLUE_INITIALIZED 0x01
|
||||
|
||||
#define GPIO_IRQ_PIN DT_INST_0_ZEPHYR_BT_HCI_SPI_SLAVE_IRQ_GPIOS_PIN
|
||||
#define GPIO_IRQ_FLAGS DT_INST_0_ZEPHYR_BT_HCI_SPI_SLAVE_IRQ_GPIOS_FLAGS
|
||||
#define GPIO_IRQ_PIN DT_GPIO_PIN(DT_INST(0, zephyr_bt_hci_spi_slave), irq_gpios)
|
||||
#define GPIO_IRQ_FLAGS DT_GPIO_FLAGS(DT_INST(0, zephyr_bt_hci_spi_slave), irq_gpios)
|
||||
|
||||
/* Needs to be aligned with the SPI master buffer size */
|
||||
#define SPI_MAX_MSG_LEN 255
|
||||
|
@ -272,13 +272,13 @@ static int hci_spi_init(struct device *unused)
|
|||
|
||||
LOG_DBG("");
|
||||
|
||||
spi_hci_dev = device_get_binding(DT_INST_0_ZEPHYR_BT_HCI_SPI_SLAVE_BUS_NAME);
|
||||
spi_hci_dev = device_get_binding(DT_BUS_LABEL(DT_INST(0, zephyr_bt_hci_spi_slave)));
|
||||
if (!spi_hci_dev) {
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
gpio_dev = device_get_binding(
|
||||
DT_INST_0_ZEPHYR_BT_HCI_SPI_SLAVE_IRQ_GPIOS_CONTROLLER);
|
||||
DT_GPIO_LABEL(DT_INST(0, zephyr_bt_hci_spi_slave), irq_gpios));
|
||||
if (!gpio_dev) {
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
|
@ -250,7 +250,7 @@ void board_init(u16_t *addr)
|
|||
struct mb_display *disp = mb_display_get();
|
||||
|
||||
nvm = device_get_binding(DT_FLASH_DEV_NAME);
|
||||
pwm = device_get_binding(DT_INST_0_NORDIC_NRF_SW_PWM_LABEL);
|
||||
pwm = device_get_binding(DT_LABEL(DT_INST(0, nordic_nrf_sw_pwm)));
|
||||
|
||||
*addr = NRF_UICR->CUSTOMER[0];
|
||||
if (!*addr || *addr == 0xffff) {
|
||||
|
|
Loading…
Reference in a new issue