Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of mbed-os-example-mbed5-blinky by
duer_app.h
00001 // Copyright (2016) Baidu Inc. All rights reserved. 00002 00003 #ifndef BAIDU_IOT_TINYDU_DEMO_DUER_APP_H 00004 #define BAIDU_IOT_TINYDU_DEMO_DUER_APP_H 00005 00006 #include "baidu_recorder_manager.h" 00007 #include "baidu_ca_scheduler.h" 00008 00009 namespace duer { 00010 00011 class DuerApp { 00012 public: 00013 enum Color { 00014 WHITE, 00015 YELLOW, 00016 PURPLE, 00017 RED, 00018 CYAN, 00019 GREEN, 00020 BLUE, 00021 OFF 00022 }; 00023 00024 DuerApp(); 00025 00026 ~DuerApp(); 00027 00028 void start(); 00029 00030 void stop(); 00031 00032 void talk_start(); 00033 00034 void talk_stop(); 00035 00036 void set_color(Color c); 00037 00038 void restart(); 00039 00040 int get_topic_id() const; 00041 00042 void pause_play(); 00043 00044 private: 00045 void button_fall_handle(); 00046 00047 void button_rise_handle(); 00048 00049 void pause_button_fall_handle(); 00050 00051 #if defined(TEST_BOARD) 00052 void send_timestamp(); 00053 #endif 00054 00055 RecorderManager _recorder; 00056 Recorder::IListener* _recorder_listener; 00057 00058 duer::Scheduler::IOnEvent* _on_event; 00059 00060 #if !defined(TARGET_UNO_91H) 00061 mbed::BusOut _indicate; 00062 #endif 00063 00064 rtos::RtosTimer _timer; 00065 unsigned int _delay; 00066 00067 #if defined(TEST_BOARD) 00068 rtos::RtosTimer _send_ticker; 00069 #endif 00070 }; 00071 00072 } // namespace duer 00073 00074 #endif // BAIDU_IOT_TINYDU_DEMO_DUER_APP_H
Generated on Tue Jul 12 2022 16:28:53 by
1.7.2
