/third_party/libwebsockets/lib/drivers/i2c/bitbang/ |
D | lws-bb-i2c.c | 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->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/ |
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->set(ctx->sda, !!(data & (1 << 7))); in lws_bb_i2c_write() [all …]
|
D | gpio-esp32.c | 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_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 …]
|
D | gpio.h | 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);
|
D | devices.c | 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,
|
D | bb-i2c.h | 23 const lws_gpio_ops_t *gpio; member
|
/third_party/libwebsockets/lib/drivers/spi/bitbang/ |
D | lws-bb-spi.c | 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->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/ |
D | gpio-esp32.c | 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, 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 …]
|
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()
|
/third_party/libwebsockets/minimal-examples/embedded/esp32/esp-wrover-kit/main/ |
D | devices.c | 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 = GPIO_NUM_4, 95 .gpio = GPIO_NUM_5, 124 .gpio = &lws_gpio_plat, [all …]
|
/third_party/libwebsockets/lib/drivers/led/ |
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()
|
D | README.md | 1 # 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/ |
D | lws-gpio.h | 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,
|
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,
|
D | lws-ili9341-spi.h | 34 const lws_gpio_ops_t *gpio; /* NULL or gpio ops */ member
|
D | lws-bb-spi.h | 43 const lws_gpio_ops_t *gpio; member
|
D | lws-bb-i2c.h | 36 const lws_gpio_ops_t *gpio; member
|
D | lws-ssd1306-i2c.h | 41 const lws_gpio_ops_t *gpio; /* NULL or gpio ops */ member
|
/third_party/libwebsockets/minimal-examples/embedded/esp32/esp-c3dev/ |
D | lws-button.c | 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() 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/ |
D | devices.c | 41 .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/ |
D | lws-button.c | 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() 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/ |
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()
|
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()
|
/third_party/libwebsockets/lib/drivers/ |
D | README.md | 23 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
|
D | CMakeLists.txt | 10 drivers/led/led-gpio.c 24 plat/freertos/esp32/drivers/gpio-esp32.c
|