Home
last modified time | relevance | path

Searched refs:mask (Results 1 – 25 of 730) sorted by relevance

12345678910>>...30

/Zephyr-Core-3.7.0/soc/atmel/sam/common/
Dsoc_sam4l_gpio.c15 uint32_t mask, uint32_t flags) in configure_common_attr() argument
20 gpio->IERC = mask; in configure_common_attr()
24 gpio->PUERS = mask; in configure_common_attr()
26 gpio->PUERC = mask; in configure_common_attr()
31 gpio->PDERS = mask; in configure_common_attr()
33 gpio->PDERC = mask; in configure_common_attr()
38 gpio->ODMERS = mask; in configure_common_attr()
40 gpio->ODMERC = mask; in configure_common_attr()
45 uint32_t mask, uint32_t flags) in configure_input_attr() argument
52 gpio->GFERC = mask; in configure_input_attr()
[all …]
Dsoc_gpio.c24 static void configure_common_attr(Pio *pio, uint32_t mask, uint32_t flags) in configure_common_attr() argument
27 pio->PIO_IDR = mask; in configure_common_attr()
31 pio->PIO_PUER = mask; in configure_common_attr()
33 pio->PIO_PUDR = mask; in configure_common_attr()
40 pio->PIO_PPDER = mask; in configure_common_attr()
42 pio->PIO_PPDDR = mask; in configure_common_attr()
48 pio->PIO_MDER = mask; in configure_common_attr()
50 pio->PIO_MDDR = mask; in configure_common_attr()
54 static void configure_input_attr(Pio *pio, uint32_t mask, uint32_t flags) in configure_input_attr() argument
61 pio->PIO_IFSCER = mask; in configure_input_attr()
[all …]
Dsoc_sam4l_pm.c42 uint32_t mask; in soc_pmc_peripheral_enable() local
54 mask = *(&PM->CPUMASK + bus_id); in soc_pmc_peripheral_enable()
55 mask |= (1U << per_idx); in soc_pmc_peripheral_enable()
60 *(&PM->CPUMASK + bus_id) = mask; in soc_pmc_peripheral_enable()
68 uint32_t mask; in soc_pmc_peripheral_disable() local
80 mask = *(&PM->CPUMASK + bus_id); in soc_pmc_peripheral_disable()
81 mask &= ~(1U << per_idx); in soc_pmc_peripheral_disable()
86 *(&PM->CPUMASK + bus_id) = mask; in soc_pmc_peripheral_disable()
94 uint32_t mask; in soc_pmc_peripheral_is_enabled() local
106 mask = *(&PM->CPUMASK + bus_id); in soc_pmc_peripheral_is_enabled()
[all …]
/Zephyr-Core-3.7.0/soc/nxp/imx/imx8ulp/adsp/
D_soc_inthandlers.h119 static inline int _xtensa_handle_one_int5(unsigned int mask) in _xtensa_handle_one_int5() argument
123 if (mask & BIT(0)) { in _xtensa_handle_one_int5()
124 mask = BIT(0); in _xtensa_handle_one_int5()
131 return mask; in _xtensa_handle_one_int5()
134 static inline int _xtensa_handle_one_int2(unsigned int mask) in _xtensa_handle_one_int2() argument
138 if (mask & 0x70006) { in _xtensa_handle_one_int2()
139 if (mask & 0x6) { in _xtensa_handle_one_int2()
140 if (mask & BIT(1)) { in _xtensa_handle_one_int2()
141 mask = BIT(1); in _xtensa_handle_one_int2()
145 if (mask & BIT(2)) { in _xtensa_handle_one_int2()
[all …]
/Zephyr-Core-3.7.0/soc/espressif/common/include/
D_soc_inthandlers.h120 static inline int _xtensa_handle_one_int1(unsigned int mask) in _xtensa_handle_one_int1() argument
124 if (mask & 0x7f) { in _xtensa_handle_one_int1()
125 if (mask & 0x7) { in _xtensa_handle_one_int1()
126 if (mask & BIT(0)) { in _xtensa_handle_one_int1()
127 mask = BIT(0); in _xtensa_handle_one_int1()
131 if (mask & BIT(1)) { in _xtensa_handle_one_int1()
132 mask = BIT(1); in _xtensa_handle_one_int1()
136 if (mask & BIT(2)) { in _xtensa_handle_one_int1()
137 mask = BIT(2); in _xtensa_handle_one_int1()
142 if (mask & 0x18) { in _xtensa_handle_one_int1()
[all …]
/Zephyr-Core-3.7.0/soc/intel/intel_adsp/cavs/
D_soc_inthandlers.h85 static inline int _xtensa_handle_one_int1(unsigned int mask) in _xtensa_handle_one_int1() argument
89 if (mask & 0x3) { in _xtensa_handle_one_int1()
90 if (mask & BIT(0)) { in _xtensa_handle_one_int1()
91 mask = BIT(0); in _xtensa_handle_one_int1()
95 if (mask & BIT(1)) { in _xtensa_handle_one_int1()
96 mask = BIT(1); in _xtensa_handle_one_int1()
101 if (mask & BIT(2)) { in _xtensa_handle_one_int1()
102 mask = BIT(2); in _xtensa_handle_one_int1()
106 if (mask & BIT(3)) { in _xtensa_handle_one_int1()
107 mask = BIT(3); in _xtensa_handle_one_int1()
[all …]
/Zephyr-Core-3.7.0/soc/intel/intel_adsp/ace/
D_soc_inthandlers.h48 static inline int _xtensa_handle_one_int1(unsigned int mask) in _xtensa_handle_one_int1() argument
52 if (mask & BIT(0)) { in _xtensa_handle_one_int1()
53 mask = BIT(0); in _xtensa_handle_one_int1()
57 if (mask & BIT(1)) { in _xtensa_handle_one_int1()
58 mask = BIT(1); in _xtensa_handle_one_int1()
65 return mask; in _xtensa_handle_one_int1()
68 static inline int _xtensa_handle_one_int2(unsigned int mask) in _xtensa_handle_one_int2() argument
72 if (mask & BIT(2)) { in _xtensa_handle_one_int2()
73 mask = BIT(2); in _xtensa_handle_one_int2()
77 if (mask & BIT(3)) { in _xtensa_handle_one_int2()
[all …]
/Zephyr-Core-3.7.0/drivers/gpio/
Dgpio_sam.c41 static int gpio_sam_port_configure(const struct device *dev, uint32_t mask, in gpio_sam_port_configure() argument
50 pio->PIO_MDER = mask; in gpio_sam_port_configure()
57 pio->PIO_MDDR = mask; in gpio_sam_port_configure()
64 pio->PIO_IDR = mask; in gpio_sam_port_configure()
66 pio->PIO_PUDR = mask; in gpio_sam_port_configure()
72 pio->PIO_PPDDR = mask; in gpio_sam_port_configure()
75 pio->PIO_PER = mask; in gpio_sam_port_configure()
77 pio->PIO_ODR = mask; in gpio_sam_port_configure()
86 pio->PIO_SODR = mask; in gpio_sam_port_configure()
90 pio->PIO_CODR = mask; in gpio_sam_port_configure()
[all …]
Dgpio_mmio32.c39 if ((config->mask & (1 << pin)) == 0) { in gpio_mmio32_config()
58 *reg = (*reg & (config->mask & ~(1 << pin))); in gpio_mmio32_config()
71 *value = *config->reg & config->mask; in gpio_mmio32_port_get_raw()
77 uint32_t mask, in gpio_mmio32_port_set_masked_raw() argument
85 mask &= config->mask; in gpio_mmio32_port_set_masked_raw()
86 value &= mask; in gpio_mmio32_port_set_masked_raw()
90 *reg = (*reg & ~mask) | value; in gpio_mmio32_port_set_masked_raw()
97 uint32_t mask) in gpio_mmio32_port_set_bits_raw() argument
104 mask &= config->mask; in gpio_mmio32_port_set_bits_raw()
108 *reg = (*reg | mask); in gpio_mmio32_port_set_bits_raw()
[all …]
Dgpio_sam4l.c41 uint32_t mask, in gpio_sam_port_configure() argument
53 gpio->IERC = mask; in gpio_sam_port_configure()
54 gpio->PUERC = mask; in gpio_sam_port_configure()
55 gpio->PDERC = mask; in gpio_sam_port_configure()
56 gpio->GPERS = mask; in gpio_sam_port_configure()
57 gpio->ODERC = mask; in gpio_sam_port_configure()
58 gpio->STERC = mask; in gpio_sam_port_configure()
67 gpio->STERS = mask; in gpio_sam_port_configure()
71 gpio->OVRS = mask; in gpio_sam_port_configure()
74 gpio->OVRC = mask; in gpio_sam_port_configure()
[all …]
Dgpio_nct38xx_port.c45 uint32_t mask; in gpio_nct38xx_pin_config() local
73 mask = BIT(pin) | ~config->pinmux_mask; in gpio_nct38xx_pin_config()
75 ret = i2c_reg_update_byte_dt(data->i2c_dev, NCT38XX_REG_MUX_CONTROL, mask, new_reg); in gpio_nct38xx_pin_config()
85 mask = BIT(pin); in gpio_nct38xx_pin_config()
87 mask, new_reg); in gpio_nct38xx_pin_config()
93 mask = BIT(pin); in gpio_nct38xx_pin_config()
95 new_reg = mask; in gpio_nct38xx_pin_config()
100 mask, new_reg); in gpio_nct38xx_pin_config()
107 new_reg = mask; in gpio_nct38xx_pin_config()
112 mask, new_reg); in gpio_nct38xx_pin_config()
[all …]
Dgpio_kscan_ite_it8xxx2.c47 uint8_t mask = BIT(pin); in gpio_kscan_it8xxx2_configure() local
57 *reg_ksi_kso_gctrl |= mask; in gpio_kscan_it8xxx2_configure()
66 *reg_ksi_kso_gpod |= mask; in gpio_kscan_it8xxx2_configure()
69 *reg_ksi_kso_gpod &= ~mask; in gpio_kscan_it8xxx2_configure()
76 *reg_ksi_kso_gdat |= mask; in gpio_kscan_it8xxx2_configure()
78 *reg_ksi_kso_gdat &= ~mask; in gpio_kscan_it8xxx2_configure()
84 *reg_ksi_kso_goen |= mask; in gpio_kscan_it8xxx2_configure()
87 *reg_ksi_kso_goen &= ~mask; in gpio_kscan_it8xxx2_configure()
91 *reg_ksi_kso_gpod |= mask; in gpio_kscan_it8xxx2_configure()
94 *reg_ksi_kso_gpod &= ~mask; in gpio_kscan_it8xxx2_configure()
[all …]
Dgpio_npcx.c107 uint32_t mask = BIT(pin); in gpio_npcx_config() local
126 inst->PDIR &= ~mask; in gpio_npcx_config()
147 inst->PTYPE |= mask; in gpio_npcx_config()
149 inst->PTYPE &= ~mask; in gpio_npcx_config()
154 inst->PPUD &= ~mask; in gpio_npcx_config()
155 inst->PPULL |= mask; in gpio_npcx_config()
157 inst->PPUD |= mask; in gpio_npcx_config()
158 inst->PPULL |= mask; in gpio_npcx_config()
161 inst->PPULL &= ~mask; in gpio_npcx_config()
166 inst->PDOUT |= mask; in gpio_npcx_config()
[all …]
Dgpio_grgpio2.c48 uint32_t mask = 1 << pin; in pin_configure() local
75 regs->output_or = mask; in pin_configure()
77 regs->output_and = ~mask; in pin_configure()
79 regs->dir_or = mask; in pin_configure()
82 regs->dir_and = ~mask; in pin_configure()
97 gpio_port_pins_t mask, in port_set_masked_raw() argument
106 value &= mask; in port_set_masked_raw()
108 port_val = (regs->output & ~mask) | value; in port_set_masked_raw()
159 const uint32_t mask = 1 << pin; in pin_interrupt_configure() local
163 if ((mask & data->imask) == 0) { in pin_interrupt_configure()
[all …]
/Zephyr-Core-3.7.0/drivers/rtc/
Drtc_utils.c15 bool rtc_utils_validate_rtc_time(const struct rtc_time *timeptr, uint16_t mask) in rtc_utils_validate_rtc_time() argument
17 if ((mask & RTC_ALARM_TIME_MASK_SECOND) && (timeptr->tm_sec < 0 || timeptr->tm_sec > 59)) { in rtc_utils_validate_rtc_time()
21 if ((mask & RTC_ALARM_TIME_MASK_MINUTE) && (timeptr->tm_min < 0 || timeptr->tm_min > 59)) { in rtc_utils_validate_rtc_time()
25 if ((mask & RTC_ALARM_TIME_MASK_HOUR) && (timeptr->tm_hour < 0 || timeptr->tm_hour > 23)) { in rtc_utils_validate_rtc_time()
29 if ((mask & RTC_ALARM_TIME_MASK_MONTH) && (timeptr->tm_mon < 0 || timeptr->tm_mon > 11)) { in rtc_utils_validate_rtc_time()
33 if ((mask & RTC_ALARM_TIME_MASK_MONTHDAY) && in rtc_utils_validate_rtc_time()
38 if ((mask & RTC_ALARM_TIME_MASK_YEAR) && (timeptr->tm_year < 0 || timeptr->tm_year > 199)) { in rtc_utils_validate_rtc_time()
42 if ((mask & RTC_ALARM_TIME_MASK_WEEKDAY) && in rtc_utils_validate_rtc_time()
47 if ((mask & RTC_ALARM_TIME_MASK_YEARDAY) && in rtc_utils_validate_rtc_time()
52 if ((mask & RTC_ALARM_TIME_MASK_NSEC) && in rtc_utils_validate_rtc_time()
/Zephyr-Core-3.7.0/soc/cdns/xtensa_sample_controller/include/
D_soc_inthandlers.h83 static inline int _xtensa_handle_one_int0(unsigned int mask) in _xtensa_handle_one_int0() argument
88 static inline int _xtensa_handle_one_int1(unsigned int mask) in _xtensa_handle_one_int1() argument
90 if (mask & 0x7f) { in _xtensa_handle_one_int1()
91 if (mask & 0x7) { in _xtensa_handle_one_int1()
92 if (mask & (1 << 0)) { in _xtensa_handle_one_int1()
98 if (mask & (1 << 1)) { in _xtensa_handle_one_int1()
104 if (mask & (1 << 2)) { in _xtensa_handle_one_int1()
111 if (mask & 0x18) { in _xtensa_handle_one_int1()
112 if (mask & (1 << 3)) { in _xtensa_handle_one_int1()
118 if (mask & (1 << 4)) { in _xtensa_handle_one_int1()
[all …]
/Zephyr-Core-3.7.0/drivers/hwinfo/
Dhwinfo_mcux_rcm.c24 uint32_t mask = 0; in hwinfo_mcux_rcm_xlate_reset_sources() local
28 mask |= RESET_LOW_POWER_WAKE; in hwinfo_mcux_rcm_xlate_reset_sources()
33 mask |= RESET_BROWNOUT; in hwinfo_mcux_rcm_xlate_reset_sources()
38 mask |= RESET_CLOCK; in hwinfo_mcux_rcm_xlate_reset_sources()
44 mask |= RESET_PLL; in hwinfo_mcux_rcm_xlate_reset_sources()
49 mask |= RESET_WATCHDOG; in hwinfo_mcux_rcm_xlate_reset_sources()
53 mask |= RESET_PIN; in hwinfo_mcux_rcm_xlate_reset_sources()
57 mask |= RESET_POR; in hwinfo_mcux_rcm_xlate_reset_sources()
62 mask |= RESET_DEBUG; in hwinfo_mcux_rcm_xlate_reset_sources()
67 mask |= RESET_CPU_LOCKUP; in hwinfo_mcux_rcm_xlate_reset_sources()
[all …]
/Zephyr-Core-3.7.0/soc/nxp/imx/imx8/adsp/
D_soc_inthandlers.h86 static inline int _xtensa_handle_one_int1(unsigned int mask) in _xtensa_handle_one_int1() argument
90 if (mask & BIT(8)) { in _xtensa_handle_one_int1()
91 mask = BIT(8); in _xtensa_handle_one_int1()
98 return mask; in _xtensa_handle_one_int1()
101 static inline int _xtensa_handle_one_int2(unsigned int mask) in _xtensa_handle_one_int2() argument
106 mask &= XCHAL_INTLEVEL2_MASK; in _xtensa_handle_one_int2()
108 if (mask & BIT(i)) { in _xtensa_handle_one_int2()
109 mask = BIT(i); in _xtensa_handle_one_int2()
116 return mask; in _xtensa_handle_one_int2()
119 static inline int _xtensa_handle_one_int3(unsigned int mask) in _xtensa_handle_one_int3() argument
[all …]
/Zephyr-Core-3.7.0/soc/nxp/imx/imx8m/adsp/
D_soc_inthandlers.h86 static inline int _xtensa_handle_one_int1(unsigned int mask) in _xtensa_handle_one_int1() argument
90 if (mask & BIT(8)) { in _xtensa_handle_one_int1()
91 mask = BIT(8); in _xtensa_handle_one_int1()
98 return mask; in _xtensa_handle_one_int1()
101 static inline int _xtensa_handle_one_int2(unsigned int mask) in _xtensa_handle_one_int2() argument
106 mask &= XCHAL_INTLEVEL2_MASK; in _xtensa_handle_one_int2()
108 if (mask & BIT(i)) { in _xtensa_handle_one_int2()
109 mask = BIT(i); in _xtensa_handle_one_int2()
116 return mask; in _xtensa_handle_one_int2()
119 static inline int _xtensa_handle_one_int3(unsigned int mask) in _xtensa_handle_one_int3() argument
[all …]
/Zephyr-Core-3.7.0/soc/nxp/imx/imx8x/adsp/
D_soc_inthandlers.h86 static inline int _xtensa_handle_one_int1(unsigned int mask) in _xtensa_handle_one_int1() argument
90 if (mask & BIT(8)) { in _xtensa_handle_one_int1()
91 mask = BIT(8); in _xtensa_handle_one_int1()
98 return mask; in _xtensa_handle_one_int1()
101 static inline int _xtensa_handle_one_int2(unsigned int mask) in _xtensa_handle_one_int2() argument
106 mask &= XCHAL_INTLEVEL2_MASK; in _xtensa_handle_one_int2()
108 if (mask & BIT(i)) { in _xtensa_handle_one_int2()
109 mask = BIT(i); in _xtensa_handle_one_int2()
116 return mask; in _xtensa_handle_one_int2()
119 static inline int _xtensa_handle_one_int3(unsigned int mask) in _xtensa_handle_one_int3() argument
[all …]
/Zephyr-Core-3.7.0/drivers/interrupt_controller/
Dwuc_ite_it8xxx2.c32 void it8xxx2_wuc_enable(const struct device *dev, uint8_t mask) in it8xxx2_wuc_enable() argument
46 *reg_wuenr |= mask; in it8xxx2_wuc_enable()
49 void it8xxx2_wuc_disable(const struct device *dev, uint8_t mask) in it8xxx2_wuc_disable() argument
63 *reg_wuenr &= ~mask; in it8xxx2_wuc_disable()
66 void it8xxx2_wuc_clear_status(const struct device *dev, uint8_t mask) in it8xxx2_wuc_clear_status() argument
76 *reg_wuesr = mask; in it8xxx2_wuc_clear_status()
79 void it8xxx2_wuc_set_polarity(const struct device *dev, uint8_t mask, uint32_t flags) in it8xxx2_wuc_set_polarity() argument
91 *reg_wubemr &= ~mask; in it8xxx2_wuc_set_polarity()
92 *reg_wuemr &= ~mask; in it8xxx2_wuc_set_polarity()
94 *reg_wubemr &= ~mask; in it8xxx2_wuc_set_polarity()
[all …]
Dintc_vexriscv_litex.c19 static inline void vexriscv_litex_irq_setmask(uint32_t mask) in vexriscv_litex_irq_setmask() argument
21 __asm__ volatile ("csrw %0, %1" :: "i"(IRQ_MASK), "r"(mask)); in vexriscv_litex_irq_setmask()
26 uint32_t mask; in vexriscv_litex_irq_getmask() local
28 __asm__ volatile ("csrr %0, %1" : "=r"(mask) : "i"(IRQ_MASK)); in vexriscv_litex_irq_getmask()
29 return mask; in vexriscv_litex_irq_getmask()
62 uint32_t pending, mask, irqs; in vexriscv_litex_irq_handler() local
65 mask = vexriscv_litex_irq_getmask(); in vexriscv_litex_irq_handler()
66 irqs = pending & mask; in vexriscv_litex_irq_handler()
/Zephyr-Core-3.7.0/soc/renesas/rzt2m/
Dsoc.c18 void rzt2m_unlock_prcrn(uint32_t mask) in rzt2m_unlock_prcrn() argument
23 prcrn |= PRC_KEY_CODE | mask; in rzt2m_unlock_prcrn()
28 void rzt2m_lock_prcrn(uint32_t mask) in rzt2m_lock_prcrn() argument
33 prcrn &= ~mask; in rzt2m_lock_prcrn()
39 void rzt2m_unlock_prcrs(uint32_t mask) in rzt2m_unlock_prcrs() argument
44 prcrs |= PRC_KEY_CODE | mask; in rzt2m_unlock_prcrs()
49 void rzt2m_lock_prcrs(uint32_t mask) in rzt2m_lock_prcrs() argument
54 prcrs &= ~mask; in rzt2m_lock_prcrs()
60 void rzt2m_set_sckcr2(uint32_t mask) in rzt2m_set_sckcr2() argument
62 syscon_write_reg(sckcr2_dev, 0, mask); in rzt2m_set_sckcr2()
[all …]
/Zephyr-Core-3.7.0/dts/arm/nuvoton/npcx/
Dnpcx-miwus-int-map.dtsi17 group-mask = <0x02>;
22 group-mask = <0x04>;
33 group-mask = <0x01>;
38 group-mask = <0x02>;
43 group-mask = <0x04>;
48 group-mask = <0x08>;
53 group-mask = <0x10>;
58 group-mask = <0x20>;
63 group-mask = <0x40>;
68 group-mask = <0x80>;
[all …]
/Zephyr-Core-3.7.0/include/zephyr/sys/
Datomic.h149 atomic_val_t mask = ATOMIC_MASK(bit); in atomic_test_and_clear_bit() local
152 old = atomic_and(ATOMIC_ELEM(target, bit), ~mask); in atomic_test_and_clear_bit()
154 return (old & mask) != 0; in atomic_test_and_clear_bit()
172 atomic_val_t mask = ATOMIC_MASK(bit); in atomic_test_and_set_bit() local
175 old = atomic_or(ATOMIC_ELEM(target, bit), mask); in atomic_test_and_set_bit()
177 return (old & mask) != 0; in atomic_test_and_set_bit()
193 atomic_val_t mask = ATOMIC_MASK(bit); in atomic_clear_bit() local
195 (void)atomic_and(ATOMIC_ELEM(target, bit), ~mask); in atomic_clear_bit()
211 atomic_val_t mask = ATOMIC_MASK(bit); in atomic_set_bit() local
213 (void)atomic_or(ATOMIC_ELEM(target, bit), mask); in atomic_set_bit()
[all …]

12345678910>>...30