From 94f2c6c61d9a4210bc9cfe1d96aa6e0edba1153f Mon Sep 17 00:00:00 2001 From: zwsd Date: Tue, 12 Jul 2022 20:40:15 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B5=B5=E8=80=81=E5=B8=88=E4=BC=AA=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- zhao.txt | 79 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 zhao.txt diff --git a/zhao.txt b/zhao.txt new file mode 100644 index 0000000..e21c2b5 --- /dev/null +++ b/zhao.txt @@ -0,0 +1,79 @@ +int total; + +void on_click(){ + send_cmd(); +} + +void on_rep(){ + total++; + if (total != 8){ + take_photo(); + send_cmd(); + } +} + +int main(){ + +} + + +--------------------------------------- +void on_message(message){ + if(message = setPotion){ + motor_set_postion(speed, poitions direction); + send_receipt(); + }else if(message == getDeviceState){ + + + + send_receipt(); + } +} + +void on_motor_stop(){ + send_report(); +} + +void on_motor_exception(){ + +} + + +void main(){ + ble_init(onmessage); + motor_init(on_motor_stop); +} + + +--------------------------------------- +onmessage_t onmessage; +void ble_init(onmessage); +void ble_send(); +--------------------------------------- + +void motor_init(on_motor_stop,on_motor_exception); +void motor_set_postion(speed, poitions direction); + +void motor_get_positon(); +void motor_is_running(); +void motor_get_exception(); + +void motor_processs(){ + ticket = getnow + +} + + + + +----------------------------------------- + + + + +中断上下文 +main上下文 + + + +