Lines Matching refs:bit

36 	uint32_t pos, bit;  in mt_set_gpio_dir_chip()  local
42 bit = pin % MAX_GPIO_REG_BITS; in mt_set_gpio_dir_chip()
45 mmio_write_32(DIR_BASE + 0x10 * pos + CLR, 1U << bit); in mt_set_gpio_dir_chip()
47 mmio_write_32(DIR_BASE + 0x10 * pos + SET, 1U << bit); in mt_set_gpio_dir_chip()
52 uint32_t pos, bit; in mt_get_gpio_dir_chip() local
58 bit = pin % MAX_GPIO_REG_BITS; in mt_get_gpio_dir_chip()
61 return (((reg & (1U << bit)) != 0) ? GPIO_DIR_OUT : GPIO_DIR_IN); in mt_get_gpio_dir_chip()
66 uint32_t pos, bit; in mt_set_gpio_out_chip() local
72 bit = pin % MAX_GPIO_REG_BITS; in mt_set_gpio_out_chip()
75 mmio_write_32(DOUT_BASE + 0x10 * pos + CLR, 1U << bit); in mt_set_gpio_out_chip()
77 mmio_write_32(DOUT_BASE + 0x10 * pos + SET, 1U << bit); in mt_set_gpio_out_chip()
82 uint32_t pos, bit; in mt_get_gpio_out_chip() local
88 bit = pin % MAX_GPIO_REG_BITS; in mt_get_gpio_out_chip()
91 return (((reg & (1U << bit)) != 0) ? 1 : 0); in mt_get_gpio_out_chip()
96 uint32_t pos, bit; in mt_get_gpio_in_chip() local
102 bit = pin % MAX_GPIO_REG_BITS; in mt_get_gpio_in_chip()
105 return (((reg & (1U << bit)) != 0) ? 1 : 0); in mt_get_gpio_in_chip()
110 uint32_t pos, bit; in mt_set_gpio_mode_chip() local
121 bit = (pin % MAX_GPIO_MODE_PER_REG) * GPIO_MODE_BITS; in mt_set_gpio_mode_chip()
124 data &= (~(mask << bit)); in mt_set_gpio_mode_chip()
125 data |= (mode << bit); in mt_set_gpio_mode_chip()
131 uint32_t pos, bit; in mt_get_gpio_mode_chip() local
140 bit = (pin % MAX_GPIO_MODE_PER_REG) * GPIO_MODE_BITS; in mt_get_gpio_mode_chip()
143 return (data >> bit) & mask; in mt_get_gpio_mode_chip()