本文整理汇总了C++中DEVICE_GET函数的典型用法代码示例。如果您正苦于以下问题:C++ DEVICE_GET函数的具体用法?C++ DEVICE_GET怎么用?C++ DEVICE_GET使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了DEVICE_GET函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: i2c_stm32_irq_config_func_4
static void i2c_stm32_irq_config_func_4(struct device *dev)
{
IRQ_CONNECT(DT_I2C_4_EVENT_IRQ, DT_I2C_4_EVENT_IRQ_PRI,
stm32_i2c_event_isr, DEVICE_GET(i2c_stm32_4), 0);
irq_enable(DT_I2C_4_EVENT_IRQ);
IRQ_CONNECT(DT_I2C_4_ERROR_IRQ, DT_I2C_4_ERROR_IRQ_PRI,
stm32_i2c_error_isr, DEVICE_GET(i2c_stm32_4), 0);
irq_enable(DT_I2C_4_ERROR_IRQ);
}
示例2: dma_qmsi_config
static void dma_qmsi_config(struct device *dev)
{
ARG_UNUSED(dev);
IRQ_CONNECT(IRQ_GET_NUMBER(QM_IRQ_DMA_0_INT_0), CONFIG_DMA_0_IRQ_PRI,
qm_dma_0_isr_0, DEVICE_GET(dma_qmsi), 0);
irq_enable(IRQ_GET_NUMBER(QM_IRQ_DMA_0_INT_0));
QM_IR_UNMASK_INTERRUPTS(QM_INTERRUPT_ROUTER->dma_0_int_0_mask);
IRQ_CONNECT(IRQ_GET_NUMBER(QM_IRQ_DMA_0_INT_1), CONFIG_DMA_0_IRQ_PRI,
qm_dma_0_isr_1, DEVICE_GET(dma_qmsi), 0);
irq_enable(IRQ_GET_NUMBER(QM_IRQ_DMA_0_INT_1));
QM_IR_UNMASK_INTERRUPTS(QM_INTERRUPT_ROUTER->dma_0_int_1_mask);
#if (CONFIG_SOC_QUARK_SE_C1000)
IRQ_CONNECT(IRQ_GET_NUMBER(QM_IRQ_DMA_0_INT_2), CONFIG_DMA_0_IRQ_PRI,
qm_dma_0_isr_2, DEVICE_GET(dma_qmsi), 0);
irq_enable(IRQ_GET_NUMBER(QM_IRQ_DMA_0_INT_2));
QM_IR_UNMASK_INTERRUPTS(QM_INTERRUPT_ROUTER->dma_0_int_2_mask);
IRQ_CONNECT(IRQ_GET_NUMBER(QM_IRQ_DMA_0_INT_3), CONFIG_DMA_0_IRQ_PRI,
qm_dma_0_isr_3, DEVICE_GET(dma_qmsi), 0);
irq_enable(IRQ_GET_NUMBER(QM_IRQ_DMA_0_INT_3));
QM_IR_UNMASK_INTERRUPTS(QM_INTERRUPT_ROUTER->dma_0_int_3_mask);
IRQ_CONNECT(IRQ_GET_NUMBER(QM_IRQ_DMA_0_INT_4), CONFIG_DMA_0_IRQ_PRI,
qm_dma_0_isr_4, DEVICE_GET(dma_qmsi), 0);
irq_enable(IRQ_GET_NUMBER(QM_IRQ_DMA_0_INT_4));
QM_IR_UNMASK_INTERRUPTS(QM_INTERRUPT_ROUTER->dma_0_int_4_mask);
IRQ_CONNECT(IRQ_GET_NUMBER(QM_IRQ_DMA_0_INT_5), CONFIG_DMA_0_IRQ_PRI,
qm_dma_0_isr_5, DEVICE_GET(dma_qmsi), 0);
irq_enable(IRQ_GET_NUMBER(QM_IRQ_DMA_0_INT_5));
QM_IR_UNMASK_INTERRUPTS(QM_INTERRUPT_ROUTER->dma_0_int_5_mask);
IRQ_CONNECT(IRQ_GET_NUMBER(QM_IRQ_DMA_0_INT_6), CONFIG_DMA_0_IRQ_PRI,
qm_dma_0_isr_6, DEVICE_GET(dma_qmsi), 0);
irq_enable(IRQ_GET_NUMBER(QM_IRQ_DMA_0_INT_6));
QM_IR_UNMASK_INTERRUPTS(QM_INTERRUPT_ROUTER->dma_0_int_6_mask);
IRQ_CONNECT(IRQ_GET_NUMBER(QM_IRQ_DMA_0_INT_7), CONFIG_DMA_0_IRQ_PRI,
qm_dma_0_isr_7, DEVICE_GET(dma_qmsi), 0);
irq_enable(IRQ_GET_NUMBER(QM_IRQ_DMA_0_INT_7));
QM_IR_UNMASK_INTERRUPTS(QM_INTERRUPT_ROUTER->dma_0_int_7_mask);
#endif /* CONFIG_SOC_QUARK_SE_C1000 */
IRQ_CONNECT(IRQ_GET_NUMBER(QM_IRQ_DMA_0_ERROR_INT),
CONFIG_DMA_0_IRQ_PRI, qm_dma_0_error_isr,
DEVICE_GET(dma_qmsi), 0);
irq_enable(IRQ_GET_NUMBER(QM_IRQ_DMA_0_ERROR_INT));
#if (QM_LAKEMONT)
QM_INTERRUPT_ROUTER->dma_0_error_int_mask &= ~QM_IR_DMA_ERROR_HOST_MASK;
#elif (QM_SENSOR)
QM_INTERRUPT_ROUTER->dma_0_error_int_mask &= ~QM_IR_DMA_ERROR_SS_MASK;
#endif
}
示例3: usart_gecko_config_func_3
static void usart_gecko_config_func_3(struct device *dev)
{
IRQ_CONNECT(DT_SILABS_GECKO_USART_3_IRQ_RX,
DT_SILABS_GECKO_USART_3_IRQ_RX_PRIORITY,
uart_gecko_isr, DEVICE_GET(usart_3), 0);
IRQ_CONNECT(DT_SILABS_GECKO_USART_3_IRQ_TX,
DT_SILABS_GECKO_USART_3_IRQ_TX_PRIORITY,
uart_gecko_isr, DEVICE_GET(usart_3), 0);
irq_enable(DT_SILABS_GECKO_USART_3_IRQ_RX);
irq_enable(DT_SILABS_GECKO_USART_3_IRQ_TX);
}
示例4: uart_mcux_config_func_5
static void uart_mcux_config_func_5(struct device *dev)
{
IRQ_CONNECT(CONFIG_UART_MCUX_5_IRQ_STATUS,
CONFIG_UART_MCUX_5_IRQ_STATUS_PRI,
uart_mcux_isr, DEVICE_GET(uart_5), 0);
irq_enable(CONFIG_UART_MCUX_5_IRQ_STATUS);
IRQ_CONNECT(CONFIG_UART_MCUX_5_IRQ_ERROR,
CONFIG_UART_MCUX_5_IRQ_ERROR_PRI,
uart_mcux_isr, DEVICE_GET(uart_5), 0);
irq_enable(CONFIG_UART_MCUX_5_IRQ_ERROR);
}
示例5: mcux_igpio_4_init
static int mcux_igpio_4_init(struct device *dev)
{
IRQ_CONNECT(CONFIG_MCUX_IGPIO_4_IRQ_0, CONFIG_MCUX_IGPIO_4_IRQ_0_PRI,
mcux_igpio_port_isr, DEVICE_GET(mcux_igpio_4), 0);
irq_enable(CONFIG_MCUX_IGPIO_4_IRQ_0);
IRQ_CONNECT(CONFIG_MCUX_IGPIO_4_IRQ_1, CONFIG_MCUX_IGPIO_4_IRQ_1_PRI,
mcux_igpio_port_isr, DEVICE_GET(mcux_igpio_4), 0);
irq_enable(CONFIG_MCUX_IGPIO_4_IRQ_1);
return 0;
}
示例6: mcux_igpio_5_init
static int mcux_igpio_5_init(struct device *dev)
{
IRQ_CONNECT(DT_MCUX_IGPIO_5_IRQ_0, DT_MCUX_IGPIO_5_IRQ_0_PRI,
mcux_igpio_port_isr, DEVICE_GET(mcux_igpio_5), 0);
irq_enable(DT_MCUX_IGPIO_5_IRQ_0);
IRQ_CONNECT(DT_MCUX_IGPIO_5_IRQ_1, DT_MCUX_IGPIO_5_IRQ_1_PRI,
mcux_igpio_port_isr, DEVICE_GET(mcux_igpio_5), 0);
irq_enable(DT_MCUX_IGPIO_5_IRQ_1);
return 0;
}
示例7: uart_mcux_config_func_5
static void uart_mcux_config_func_5(struct device *dev)
{
IRQ_CONNECT(IRQ_UART5_STATUS, CONFIG_UART_MCUX_5_IRQ_PRI,
uart_mcux_isr, DEVICE_GET(uart_5), 0);
irq_enable(IRQ_UART5_STATUS);
#ifdef IRQ_UART5_ERROR
IRQ_CONNECT(IRQ_UART5_ERROR, CONFIG_UART_MCUX_5_IRQ_PRI,
uart_mcux_isr, DEVICE_GET(uart_5), 0);
irq_enable(IRQ_UART5_ERROR);
#endif
}
示例8: qdec_nrfx_event_handler
static void qdec_nrfx_event_handler(nrfx_qdec_event_t event)
{
sensor_trigger_handler_t handler;
unsigned int key;
switch (event.type) {
case NRF_QDEC_EVENT_REPORTRDY:
accumulate(&qdec_nrfx_data, event.data.report.acc);
key = irq_lock();
handler = qdec_nrfx_data.data_ready_handler;
irq_unlock(key);
if (handler) {
struct sensor_trigger trig = {
.type = SENSOR_TRIG_DATA_READY,
.chan = SENSOR_CHAN_ROTATION,
};
handler(DEVICE_GET(qdec_nrfx), &trig);
}
break;
default:
LOG_ERR("unhandled event (0x%x)", event.type);
break;
}
}
示例9: uart_cmsdk_apb_irq_config_func_4
static void uart_cmsdk_apb_irq_config_func_4(struct device *dev)
{
IRQ_CONNECT(DT_ARM_CMSDK_UART_4_IRQ_TX,
DT_ARM_CMSDK_UART_4_IRQ_TX_PRIORITY,
uart_cmsdk_apb_isr,
DEVICE_GET(uart_cmsdk_apb_4),
0);
irq_enable(DT_ARM_CMSDK_UART_4_IRQ_TX);
IRQ_CONNECT(DT_ARM_CMSDK_UART_4_IRQ_RX,
DT_ARM_CMSDK_UART_4_IRQ_RX_PRIORITY,
uart_cmsdk_apb_isr,
DEVICE_GET(uart_cmsdk_apb_4),
0);
irq_enable(DT_ARM_CMSDK_UART_4_IRQ_RX);
}
示例10: i2c_stm32_irq_config_func_2
static void i2c_stm32_irq_config_func_2(struct device *dev)
{
#ifdef CONFIG_I2C_STM32_COMBINED_INTERRUPT
IRQ_CONNECT(DT_I2C_2_COMBINED_IRQ, DT_I2C_2_COMBINED_IRQ_PRI,
stm32_i2c_combined_isr, DEVICE_GET(i2c_stm32_2), 0);
irq_enable(DT_I2C_2_COMBINED_IRQ);
#else
IRQ_CONNECT(DT_I2C_2_EVENT_IRQ, DT_I2C_2_EVENT_IRQ_PRI,
stm32_i2c_event_isr, DEVICE_GET(i2c_stm32_2), 0);
irq_enable(DT_I2C_2_EVENT_IRQ);
IRQ_CONNECT(DT_I2C_2_ERROR_IRQ, DT_I2C_2_ERROR_IRQ_PRI,
stm32_i2c_error_isr, DEVICE_GET(i2c_stm32_2), 0);
irq_enable(DT_I2C_2_ERROR_IRQ);
#endif
}
示例11: mcux_wdog_config_func_0
static void mcux_wdog_config_func_0(struct device *dev)
{
IRQ_CONNECT(CONFIG_WDT_0_IRQ, CONFIG_WDT_0_IRQ_PRI,
mcux_wdog_isr, DEVICE_GET(mcux_wdog_0), 0);
irq_enable(CONFIG_WDT_0_IRQ);
}
示例12: i2c_mcux_config_func_1
static void i2c_mcux_config_func_1(struct device *dev)
{
IRQ_CONNECT(CONFIG_I2C_MCUX_1_IRQ, CONFIG_I2C_MCUX_1_IRQ_PRI,
i2c_mcux_isr, DEVICE_GET(i2c_mcux_1), 0);
irq_enable(CONFIG_I2C_MCUX_1_IRQ);
}
示例13: imx_gpio_7_init
static int imx_gpio_7_init(struct device *dev)
{
IRQ_CONNECT(DT_GPIO_IMX_PORT_7_IRQ_0,
DT_GPIO_IMX_PORT_7_IRQ_0_PRI,
imx_gpio_port_isr, DEVICE_GET(imx_gpio_7), 0);
irq_enable(DT_GPIO_IMX_PORT_7_IRQ_0);
IRQ_CONNECT(DT_GPIO_IMX_PORT_7_IRQ_1,
DT_GPIO_IMX_PORT_7_IRQ_1_PRI,
imx_gpio_port_isr, DEVICE_GET(imx_gpio_7), 0);
irq_enable(DT_GPIO_IMX_PORT_7_IRQ_1);
return 0;
}
示例14: mcux_adc16_config_func_1
static void mcux_adc16_config_func_1(struct device *dev)
{
IRQ_CONNECT(CONFIG_ADC_1_IRQ, CONFIG_ADC_1_IRQ_PRI,
mcux_adc16_isr, DEVICE_GET(mcux_adc16_1), 0);
irq_enable(CONFIG_ADC_1_IRQ);
}
示例15: timer_cmsdk_apb_config_1
static void timer_cmsdk_apb_config_1(struct device *dev)
{
IRQ_CONNECT(CMSDK_APB_TIMER_1_IRQ, CONFIG_TIMER_TMR_CMSDK_APB_1_IRQ_PRI,
timer_tmr_cmsdk_apb_isr,
DEVICE_GET(timer_tmr_cmsdk_apb_0), 0);
irq_enable(CMSDK_APB_TIMER_1_IRQ);
}