/third_party/libwebsockets/lib/drivers/i2c/bitbang/ |
H A D | lws-bb-i2c.c | 2 * I2C bitbang implementation using generic gpio 24 * This is like an abstract class for gpio, a real implementation provides 25 * functions for the ops that use the underlying OS gpio arrangements. 34 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 in lws_bb_i2c_start() [all...] |
/third_party/libwebsockets/minimal-examples/embedded/esp32/esp-c3dev/main/ |
H A D | bb-i2c.c | 17 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 in lws_bb_i2c_write() [all...] |
H A D | gpio-esp32.c | 1 #include <driver/gpio.h> 2 #include "gpio-esp32.h" 5 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_INPU in lws_gpio_esp32_mode_read() 20 lws_gpio_esp32_read(_lws_plat_gpio_t gpio) lws_gpio_esp32_read() argument 25 lws_gpio_esp32_set(_lws_plat_gpio_t gpio, int val) lws_gpio_esp32_set() argument [all...] |
H A D | gpio.h | 2 * lws genric gpio 19 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);
|
H A D | devices.c | 18 #include <driver/gpio.h> 33 .gpio = GPIO_NUM_0, 51 { .gpio = GPIO_NUM_8, .index = 0, .active_level = 1 } 68 .gpio = &lws_gpio_plat, 81 .gpio = GPIO_NUM_8,
|
H A D | bb-i2c.h | 13 #include "gpio-esp32.h" 23 const lws_gpio_ops_t *gpio; member
|
/third_party/libwebsockets/lib/drivers/spi/bitbang/ |
H A D | lws-bb-spi.c | 2 * SPI bitbang implementation using generic gpio 34 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 in lws_bb_spi_write() [all...] |
/third_party/libwebsockets/lib/plat/freertos/esp32/drivers/ |
H A D | gpio-esp32.c | 2 * esp32 / esp-idf gpio 28 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, va in lws_gpio_esp32_set() 79 lws_gpio_esp32_irq_mode(_lws_plat_gpio_t gpio, lws_gpio_irq_t irq_type, lws_gpio_irq_cb_t cb, void *arg) lws_gpio_esp32_irq_mode() argument [all...] |
H A D | pwm-esp32.c | 54 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() 81 lwsl_err("%s: unknown gpio for pwm\n", __func__); in lws_pwm_plat_intensity()
|
/third_party/libwebsockets/minimal-examples/embedded/esp32/esp-wrover-kit/main/ |
H A D | devices.c | 18 #include <driver/gpio.h> 31 * gpio0, gpio is also used for one of the RGB LEDs channels control so it's not 40 .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 [all...] |
H A D | lws-minimal-esp32.c | 23 #include <driver/gpio.h>
|
/third_party/libwebsockets/lib/drivers/led/ |
H A D | led-gpio.c | 68 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()
|
/third_party/libwebsockets/include/libwebsockets/ |
H A D | lws-gpio.h | 24 * This is like an abstract class for gpio, a real implementation provides 25 * functions for the ops that use the underlying OS gpio arrangements. 53 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,
|
H A D | lws-pwm.h | 26 _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,
|
H A D | lws-ssd1306-i2c.h | 41 const lws_gpio_ops_t *gpio; /* NULL or gpio ops */ member 42 _lws_plat_gpio_t reset_gpio; /* if gpio ops, nReset gpio # */
|
H A D | lws-ili9341-spi.h | 34 const lws_gpio_ops_t *gpio; /* NULL or gpio ops */ member 35 _lws_plat_gpio_t reset_gpio; /* if gpio ops, nReset gpio # */
|
H A D | lws-bb-spi.h | 2 * I2C - bitbanged generic gpio implementation 24 * This is like an abstract class for gpio, a real implementation provides 25 * functions for the ops that use the underlying OS gpio arrangements. 43 const lws_gpio_ops_t *gpio; member
|
H A D | lws-bb-i2c.h | 2 * I2C - bitbanged generic gpio implementation 24 * This is like an abstract class for gpio, a real implementation provides 25 * functions for the ops that use the underlying OS gpio arrangements. 36 const lws_gpio_ops_t *gpio; member
|
H A D | lws-button.h | 24 * Leverages the lws generic gpio pieces to bind gpio buttons to smd events 61 * bindings to gpio, and lws_smd event name information 65 _lws_plat_gpio_t gpio; member 88 * and their smd names, and active levels, and binds it to a gpio implementation
|
H A D | lws-led.h | 25 * functions for the ops that use the underlying, eg, OS gpio arrangements. 90 _lws_plat_gpio_t gpio; member 98 /**< if NULL, gpio controls the led directly. If set to a pwm_ops,
|
/third_party/libwebsockets/minimal-examples/embedded/esp32/esp-heltec-wb32/main/ |
H A D | devices.c | 18 #include <driver/gpio.h> 44 .gpio = &lws_gpio_plat, 54 .gpio = GPIO_NUM_0, 72 { .gpio = GPIO_NUM_25, .index = 0, .active_level = 1 } 88 .gpio = &lws_gpio_plat, 100 .gpio = GPIO_NUM_25,
|
/third_party/libwebsockets/lib/drivers/button/ |
H A D | lws-button.c | 116 * The ISR and bottom-half is shared by all the buttons. Each gpio in LWS_PLAT_TIMER_CB() 137 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() 188 * telling us. We can't trust the gpio state if we read it now 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() 450 /* this only runs inbetween a gpio ISR and the bottom half */ in lws_button_controller_create() 508 bc->gpio_ops->mode(bc->button_map[n].gpio, in lws_button_enable() [all...] |
/third_party/libwebsockets/minimal-examples/embedded/esp32/esp-c3dev/ |
H A D | lws-button.c | 113 * The ISR and bottom-half is shared by all the buttons. Each gpio in LWS_PLAT_TIMER_CB() 134 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() 186 * telling us. We can't trust the gpio state if we read it now 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() 417 /* this only runs inbetween a gpio ISR and the bottom half */ in lws_button_controller_create() 473 bc->gpio_ops->mode(bc->button_map[n].gpio, in lws_button_enable() [all...] |
/third_party/libwebsockets/lib/drivers/display/ |
H A D | ssd1306-i2c.c | 55 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()
|
H A D | ili9341-spi.c | 73 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()
|