Home
last modified time | relevance | path

Searched refs:gpio (Results 1 – 25 of 38) sorted by relevance

12

/third_party/libwebsockets/lib/drivers/i2c/bitbang/
Dlws-bb-i2c.c34 ctx->gpio->mode(ctx->scl, LWSGGPIO_FL_WRITE | LWSGGPIO_FL_READ | LWSGGPIO_FL_PULLUP); in lws_bb_i2c_init()
35 ctx->gpio->mode(ctx->sda, LWSGGPIO_FL_WRITE | LWSGGPIO_FL_READ | LWSGGPIO_FL_PULLUP); in lws_bb_i2c_init()
45 ctx->gpio->set(ctx->sda, 1); in lws_bb_i2c_start()
46 ctx->gpio->set(ctx->scl, 1); in lws_bb_i2c_start()
49 if (!ctx->gpio->read(ctx->sda)) in lws_bb_i2c_start()
52 ctx->gpio->set(ctx->sda, 0); in lws_bb_i2c_start()
54 ctx->gpio->set(ctx->scl, 0); in lws_bb_i2c_start()
64 ctx->gpio->set(ctx->sda, 0); in lws_bb_i2c_stop()
65 ctx->gpio->set(ctx->scl, 1); in lws_bb_i2c_stop()
68 while (!ctx->gpio->read(ctx->scl)) in lws_bb_i2c_stop()
[all …]
/third_party/libwebsockets/minimal-examples/embedded/esp32/esp-c3dev/main/
Dbb-i2c.c17 ctx->gpio->set(ctx->sda, 1); in lws_bb_i2c_start()
18 ctx->gpio->set(ctx->scl, 1); in lws_bb_i2c_start()
21 if (!ctx->gpio->read(ctx->sda)) in lws_bb_i2c_start()
24 ctx->gpio->set(ctx->sda, 0); in lws_bb_i2c_start()
26 ctx->gpio->set(ctx->scl, 0); in lws_bb_i2c_start()
36 ctx->gpio->set(ctx->sda, 0); in lws_bb_i2c_stop()
37 ctx->gpio->set(ctx->scl, 1); in lws_bb_i2c_stop()
40 while (!ctx->gpio->read(ctx->scl)) in lws_bb_i2c_stop()
43 ctx->gpio->set(ctx->sda, 1); in lws_bb_i2c_stop()
54 ctx->gpio->set(ctx->sda, !!(data & (1 << 7))); in lws_bb_i2c_write()
[all …]
Dgpio-esp32.c5 lws_gpio_esp32_mode_write(_lws_plat_gpio_t gpio) in lws_gpio_esp32_mode_write() argument
7 gpio_reset_pin(gpio); in lws_gpio_esp32_mode_write()
8 gpio_set_pull_mode(gpio, GPIO_PULLUP_ONLY); in lws_gpio_esp32_mode_write()
9 gpio_set_direction(gpio, GPIO_MODE_INPUT_OUTPUT); in lws_gpio_esp32_mode_write()
10 gpio_set_level(gpio, 1); in lws_gpio_esp32_mode_write()
13 lws_gpio_esp32_mode_read(_lws_plat_gpio_t gpio) in lws_gpio_esp32_mode_read() argument
15 gpio_set_pull_mode(gpio, GPIO_PULLUP_ONLY); in lws_gpio_esp32_mode_read()
16 gpio_set_direction(gpio, GPIO_MODE_INPUT); in lws_gpio_esp32_mode_read()
17 gpio_set_level(gpio, 1); in lws_gpio_esp32_mode_read()
20 lws_gpio_esp32_read(_lws_plat_gpio_t gpio) in lws_gpio_esp32_read() argument
[all …]
Dgpio.h19 void (*mode_write)(_lws_plat_gpio_t gpio);
20 void (*mode_read)(_lws_plat_gpio_t gpio);
21 int (*read)(_lws_plat_gpio_t gpio);
22 void (*set)(_lws_plat_gpio_t gpio, int val);
Ddevices.c33 .gpio = GPIO_NUM_0,
51 { .gpio = GPIO_NUM_8, .index = 0, .active_level = 1 }
68 .gpio = &lws_gpio_plat,
81 .gpio = GPIO_NUM_8,
Dbb-i2c.h23 const lws_gpio_ops_t *gpio; member
/third_party/libwebsockets/lib/drivers/spi/bitbang/
Dlws-bb-spi.c34 ctx->gpio->mode(ctx->ncs[n], LWSGGPIO_FL_WRITE); in lws_bb_spi_init()
36 ctx->gpio->mode(ctx->ncmd[n], LWSGGPIO_FL_WRITE); in lws_bb_spi_init()
39 ctx->gpio->mode(ctx->clk, LWSGGPIO_FL_WRITE | in lws_bb_spi_init()
42 ctx->gpio->mode(ctx->mosi, LWSGGPIO_FL_WRITE | LWSGGPIO_FL_START_LOW); in lws_bb_spi_init()
43 ctx->gpio->mode(ctx->miso, LWSGGPIO_FL_READ | LWSGGPIO_FL_PULLUP); in lws_bb_spi_init()
61 ctx->gpio->set(ctx->clk, inv); in lws_bb_spi_write()
62 ctx->gpio->set(ctx->mosi, !!(u & 0x80)); in lws_bb_spi_write()
63 ctx->gpio->set(ctx->clk, !inv); in lws_bb_spi_write()
64 ctx->gpio->set(ctx->clk, inv); in lws_bb_spi_write()
65 ctx->gpio->set(ctx->mosi, !!(u & 0x40)); in lws_bb_spi_write()
[all …]
/third_party/libwebsockets/lib/plat/freertos/esp32/drivers/
Dgpio-esp32.c28 lws_gpio_esp32_mode(_lws_plat_gpio_t gpio, int flags) in lws_gpio_esp32_mode() argument
61 gpio_reset_pin(gpio); in lws_gpio_esp32_mode()
62 gpio_set_direction(gpio, mode); in lws_gpio_esp32_mode()
63 gpio_set_pull_mode(gpio, pup); in lws_gpio_esp32_mode()
64 gpio_set_level(gpio, flags & LWSGGPIO_FL_START_LOW ? 0 : 1); in lws_gpio_esp32_mode()
68 lws_gpio_esp32_read(_lws_plat_gpio_t gpio) in lws_gpio_esp32_read() argument
70 return gpio_get_level(gpio); in lws_gpio_esp32_read()
73 lws_gpio_esp32_set(_lws_plat_gpio_t gpio, int val) in lws_gpio_esp32_set() argument
75 gpio_set_level(gpio, val); in lws_gpio_esp32_set()
79 lws_gpio_esp32_irq_mode(_lws_plat_gpio_t gpio, lws_gpio_irq_t irq_type, in lws_gpio_esp32_irq_mode() argument
[all …]
Dpwm-esp32.c54 lc.gpio_num = lo->pwm_map[n].gpio; in lws_pwm_plat_init()
64 lws_pwm_plat_intensity(const struct lws_pwm_ops *lo, _lws_plat_gpio_t gpio, in lws_pwm_plat_intensity() argument
70 if (lo->pwm_map[n].gpio == gpio) { in lws_pwm_plat_intensity()
/third_party/libwebsockets/minimal-examples/embedded/esp32/esp-wrover-kit/main/
Ddevices.c40 .gpio = GPIO_NUM_14,
58 { .gpio = GPIO_NUM_2, .index = 0, .active_level = 1 },
59 { .gpio = GPIO_NUM_0, .index = 1, .active_level = 1 },
60 { .gpio = GPIO_NUM_4, .index = 2, .active_level = 1 },
61 { .gpio = GPIO_NUM_5, .index = 3, .active_level = 0 }
77 .gpio = GPIO_NUM_2,
83 .gpio = GPIO_NUM_0,
89 .gpio = GPIO_NUM_4,
95 .gpio = GPIO_NUM_5,
124 .gpio = &lws_gpio_plat,
[all …]
/third_party/libwebsockets/lib/drivers/led/
Dled-gpio.c68 lgc->gpio_ops->mode(map->gpio, LWSGGPIO_FL_READ); in lws_led_gpio_create()
69 lgc->gpio_ops->set(map->gpio, 0); in lws_led_gpio_create()
71 lgc->gpio_ops->mode(map->gpio, LWSGGPIO_FL_WRITE); in lws_led_gpio_create()
72 lgc->gpio_ops->set(map->gpio, in lws_led_gpio_create()
116 map->pwm_ops->intensity(map->pwm_ops, map->gpio, inten); in lws_led_gpio_intensity()
118 lgc->gpio_ops->set(map->gpio, in lws_led_gpio_intensity()
DREADME.md1 # lws_led gpio and pwm class drivers
4 to gpio and pwm controllers, and automatically handled pwm sequencers.
32 .gpio = GPIO_NUM_25,
/third_party/libwebsockets/include/libwebsockets/
Dlws-gpio.h53 void (*mode)(_lws_plat_gpio_t gpio, int flags);
54 int (*read)(_lws_plat_gpio_t gpio);
55 void (*set)(_lws_plat_gpio_t gpio, int val);
56 int (*irq_mode)(_lws_plat_gpio_t gpio, lws_gpio_irq_t irq,
Dlws-pwm.h26 _lws_plat_gpio_t gpio; member
33 void (*intensity)(const struct lws_pwm_ops *lo, _lws_plat_gpio_t gpio,
43 lws_pwm_plat_intensity(const struct lws_pwm_ops *lo, _lws_plat_gpio_t gpio,
Dlws-ili9341-spi.h34 const lws_gpio_ops_t *gpio; /* NULL or gpio ops */ member
Dlws-bb-spi.h43 const lws_gpio_ops_t *gpio; member
Dlws-bb-i2c.h36 const lws_gpio_ops_t *gpio; member
Dlws-ssd1306-i2c.h41 const lws_gpio_ops_t *gpio; /* NULL or gpio ops */ member
/third_party/libwebsockets/minimal-examples/embedded/esp32/esp-c3dev/
Dlws-button.c134 bc->gpio_ops->irq_mode(bc->button_map[n].gpio, in LWS_PLAT_TIMER_CB()
144 bc->gpio_ops->set(bc->button_map[n].gpio, in LWS_PLAT_TIMER_CB()
146 bc->gpio_ops->mode(bc->button_map[n].gpio, LWSGGPIO_FL_WRITE); in LWS_PLAT_TIMER_CB()
179 bc->gpio_ops->mode(bc->button_map[n].gpio, LWSGGPIO_FL_READ); in LWS_PLAT_TIMER_CB()
192 bc->gpio_ops->irq_mode(bc->button_map[n].gpio, in LWS_PLAT_TIMER_CB()
228 active = bc->gpio_ops->read(bc->button_map[n].gpio) ^ in LWS_PLAT_TIMER_CB()
473 bc->gpio_ops->mode(bc->button_map[n].gpio, in lws_button_enable()
483 bc->gpio_ops->irq_mode(bc->button_map[n].gpio, in lws_button_enable()
492 bc->gpio_ops->irq_mode(bc->button_map[n].gpio, in lws_button_enable()
/third_party/libwebsockets/minimal-examples/embedded/esp32/esp-heltec-wb32/main/
Ddevices.c41 .gpio = &lws_gpio_plat,
51 .gpio = GPIO_NUM_0,
69 { .gpio = GPIO_NUM_25, .index = 0, .active_level = 1 }
85 .gpio = &lws_gpio_plat,
97 .gpio = GPIO_NUM_25,
/third_party/libwebsockets/lib/drivers/button/
Dlws-button.c137 bc->gpio_ops->irq_mode(bc->button_map[n].gpio, in LWS_PLAT_TIMER_CB()
147 bc->gpio_ops->set(bc->button_map[n].gpio, in LWS_PLAT_TIMER_CB()
149 bc->gpio_ops->mode(bc->button_map[n].gpio, LWSGGPIO_FL_WRITE); in LWS_PLAT_TIMER_CB()
181 bc->gpio_ops->mode(bc->button_map[n].gpio, LWSGGPIO_FL_READ); in LWS_PLAT_TIMER_CB()
194 bc->gpio_ops->irq_mode(bc->button_map[n].gpio, in LWS_PLAT_TIMER_CB()
232 active = bc->gpio_ops->read(bc->button_map[n].gpio) ^ in LWS_PLAT_TIMER_CB()
508 bc->gpio_ops->mode(bc->button_map[n].gpio, in lws_button_enable()
518 bc->gpio_ops->irq_mode(bc->button_map[n].gpio, in lws_button_enable()
527 bc->gpio_ops->irq_mode(bc->button_map[n].gpio, in lws_button_enable()
/third_party/libwebsockets/lib/drivers/display/
Dssd1306-i2c.c55 if (si->gpio) { in lws_display_ssd1306_i2c_init()
56 si->gpio->mode(si->reset_gpio, LWSGGPIO_FL_WRITE | in lws_display_ssd1306_i2c_init()
58 si->gpio->set(si->reset_gpio, 0); in lws_display_ssd1306_i2c_init()
60 si->gpio->set(si->reset_gpio, 1); in lws_display_ssd1306_i2c_init()
Dili9341-spi.c73 if (ili->gpio) { in lws_display_ili9341_spi_init()
74 ili->gpio->mode(ili->reset_gpio, LWSGGPIO_FL_WRITE | in lws_display_ili9341_spi_init()
76 ili->gpio->set(ili->reset_gpio, 0); in lws_display_ili9341_spi_init()
79 ili->gpio->set(ili->reset_gpio, 1); in lws_display_ili9341_spi_init()
/third_party/libwebsockets/lib/drivers/
DREADME.md23 your work to other scenarios... for example, there is a generic gpio object
25 to use OS drivers or bitbang using the generic gpio object, buttons on top of
26 generic gpio, led class that can use generic gpio or pwm interchangeably,
27 platform-specific gpio, i2c, pwm implementations that can be used at the generic
DCMakeLists.txt10 drivers/led/led-gpio.c
24 plat/freertos/esp32/drivers/gpio-esp32.c

12