|
@ -8,6 +8,7 @@ |
|
|
#include "string.h" |
|
|
#include "string.h" |
|
|
// |
|
|
// |
|
|
#include "ble_spp_server_demo.h" |
|
|
#include "ble_spp_server_demo.h" |
|
|
|
|
|
#include "ble_uart.h" |
|
|
#include "motor_drive.h" |
|
|
#include "motor_drive.h" |
|
|
#include "timer_u.h" |
|
|
#include "timer_u.h" |
|
|
|
|
|
|
|
@ -51,7 +52,9 @@ void app_main(void) { |
|
|
constructor_bluetooth_processer(&s_bluetooth_processer); |
|
|
constructor_bluetooth_processer(&s_bluetooth_processer); |
|
|
ble_spp_server_demo_app_main(&s_bluetooth_processer); |
|
|
ble_spp_server_demo_app_main(&s_bluetooth_processer); |
|
|
timer_group_init(TIMER_GROUP_0, TIMER_0, false, timer_group0_interval_num, timer_interval_ms); |
|
|
timer_group_init(TIMER_GROUP_0, TIMER_0, false, timer_group0_interval_num, timer_interval_ms); |
|
|
motor_drive_uart_init(); |
|
|
|
|
|
|
|
|
// motor_drive_uart_init(); |
|
|
|
|
|
// ble_uart_init(UART_NUM_2, 4, 5); |
|
|
|
|
|
// char* test_str = "This is a test string.\n"; |
|
|
|
|
|
|
|
|
while (true) { |
|
|
while (true) { |
|
|
bluetooth_gatts_try_process_data(); |
|
|
bluetooth_gatts_try_process_data(); |
|
@ -64,6 +67,10 @@ void app_main(void) { |
|
|
ESP_LOGI("test", "info log ok\n"); |
|
|
ESP_LOGI("test", "info log ok\n"); |
|
|
s_bluetooth_processer.motor_drive_turn_flag = false; |
|
|
s_bluetooth_processer.motor_drive_turn_flag = false; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// uart_write_bytes(UART_NUM_2, (const char*)test_str, strlen(test_str)); |
|
|
|
|
|
// ets_delay_us(1000000); |
|
|
|
|
|
// ble_receive(UART_NUM_2); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
return; |
|
|
return; |
|
|