switch_1 and switch_2

This commit is contained in:
2024-01-06 02:24:11 -05:00
parent 76a17f1e85
commit 78c08718ee
3 changed files with 11 additions and 1 deletions

View File

@@ -113,6 +113,7 @@ void app_driver_init()
.mode = GPIO_MODE_OUTPUT, .mode = GPIO_MODE_OUTPUT,
.pull_up_en = 1, .pull_up_en = 1,
}; };
// Bit mask to configure output GPIOs
io_conf.pin_bit_mask = ((uint64_t)1 << OUTPUT_GPIO); io_conf.pin_bit_mask = ((uint64_t)1 << OUTPUT_GPIO);
/* Configure the GPIO */ /* Configure the GPIO */
gpio_config(&io_conf); gpio_config(&io_conf);

View File

@@ -1,4 +1,12 @@
/* Multi-Device Example /* Rainmaker Multi-Device Example
Original code source: Espressif Rainmaker example code.
Created on: Jan 6, 2024
Modified on: Jan 6, 2024
Edited by: Alexander Bobkov
This example code is in the Public Domain (or CC0 licensed, at your option.) This example code is in the Public Domain (or CC0 licensed, at your option.)

View File

@@ -9,6 +9,7 @@
#include <stdint.h> #include <stdint.h>
#include <stdbool.h> #include <stdbool.h>
// Default values
#define DEFAULT_SWITCH_POWER true #define DEFAULT_SWITCH_POWER true
#define DEFAULT_LIGHT_POWER true #define DEFAULT_LIGHT_POWER true
#define DEFAULT_LIGHT_BRIGHTNESS 25 #define DEFAULT_LIGHT_BRIGHTNESS 25