医美代码重构
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
901 B

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
  1. #include "esp_log.h"
  2. #include "esp_system.h"
  3. #include "freertos/FreeRTOS.h"
  4. #include "freertos/event_groups.h"
  5. #include "freertos/task.h"
  6. #include "nvs_flash.h"
  7. #include "string.h"
  8. #include "driver/gpio.h"
  9. //
  10. #include "ble_spp_server_demo.h"
  11. #define Electric_relay1 25
  12. #define Electric_relay2 26
  13. #define GPIO_OUTPUT_PIN_SEL ((1ULL << Electric_relay1) | (1ULL << Electric_relay2))
  14. void gpio_rgb_init() {
  15. gpio_config_t gpio_grb_led_structer;
  16. gpio_grb_led_structer.intr_type = GPIO_INTR_DISABLE;
  17. gpio_grb_led_structer.mode = GPIO_MODE_OUTPUT;
  18. gpio_grb_led_structer.pin_bit_mask = GPIO_OUTPUT_PIN_SEL;
  19. gpio_grb_led_structer.pull_down_en = 0;
  20. gpio_grb_led_structer.pull_up_en = 0;
  21. gpio_config(&gpio_grb_led_structer);
  22. }
  23. void app_main(void) {
  24. // ble_spp_server_demo_app_main();
  25. gpio_rgb_init();
  26. gpio_set_level(Electric_relay1,0);
  27. gpio_set_level(Electric_relay2,0);
  28. return;
  29. }