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
Diff: DuerOS-Light-SDK-v1.1.0/demo/duer_app.h
- Revision:
- 47:9e361da97763
diff -r 183cfc59d4e4 -r 9e361da97763 DuerOS-Light-SDK-v1.1.0/demo/duer_app.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/DuerOS-Light-SDK-v1.1.0/demo/duer_app.h Tue Jul 18 16:54:45 2017 +0800
@@ -0,0 +1,74 @@
+// Copyright (2016) Baidu Inc. All rights reserved.
+
+#ifndef BAIDU_IOT_TINYDU_DEMO_DUER_APP_H
+#define BAIDU_IOT_TINYDU_DEMO_DUER_APP_H
+
+#include "baidu_recorder_manager.h"
+#include "baidu_ca_scheduler.h"
+
+namespace duer {
+
+class DuerApp {
+public:
+ enum Color {
+ WHITE,
+ YELLOW,
+ PURPLE,
+ RED,
+ CYAN,
+ GREEN,
+ BLUE,
+ OFF
+ };
+
+ DuerApp();
+
+ ~DuerApp();
+
+ void start();
+
+ void stop();
+
+ void talk_start();
+
+ void talk_stop();
+
+ void set_color(Color c);
+
+ void restart();
+
+ int get_topic_id() const;
+
+ void pause_play();
+
+private:
+ void button_fall_handle();
+
+ void button_rise_handle();
+
+ void pause_button_fall_handle();
+
+#if defined(TEST_BOARD)
+ void send_timestamp();
+#endif
+
+ RecorderManager _recorder;
+ Recorder::IListener* _recorder_listener;
+
+ duer::Scheduler::IOnEvent* _on_event;
+
+#if !defined(TARGET_UNO_91H)
+ mbed::BusOut _indicate;
+#endif
+
+ rtos::RtosTimer _timer;
+ unsigned int _delay;
+
+#if defined(TEST_BOARD)
+ rtos::RtosTimer _send_ticker;
+#endif
+};
+
+} // namespace duer
+
+#endif // BAIDU_IOT_TINYDU_DEMO_DUER_APP_H
