|
|
@ -2,7 +2,7 @@ |
|
|
|
#include "esp_log.h" |
|
|
|
#include "driver/gpio.h" |
|
|
|
|
|
|
|
static key_ble_cb_t s_ble_gattc_write_char_cb; |
|
|
|
static key_ble_cb_t s_ble_gattc_write_char; |
|
|
|
|
|
|
|
void key_init() |
|
|
|
{ |
|
|
@ -27,7 +27,7 @@ void key_schedule() |
|
|
|
while (gpio_get_level(KEY_REC) == 0) |
|
|
|
{ |
|
|
|
} |
|
|
|
s_ble_gattc_write_char_cb(send_string, strlen(send_string)); |
|
|
|
s_ble_gattc_write_char(send_string, strlen(send_string)); |
|
|
|
ESP_LOGI("Finny", "stop"); |
|
|
|
} |
|
|
|
if (gpio_get_level(KEY_MODE) == 0) |
|
|
@ -38,9 +38,9 @@ void key_schedule() |
|
|
|
while (gpio_get_level(KEY_MODE) == 0) |
|
|
|
{ |
|
|
|
} |
|
|
|
s_ble_gattc_write_char_cb(send_string, strlen(send_string)); |
|
|
|
s_ble_gattc_write_char(send_string, strlen(send_string)); |
|
|
|
ESP_LOGI("Finny", "stop"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
void key_ble_send_cmd_reg(key_ble_cb_t cb) { s_ble_gattc_write_char_cb = cb; }; |
|
|
|
void key_ble_send_cmd_reg(key_ble_cb_t cb) { s_ble_gattc_write_char = cb; }; |