File tree Expand file tree Collapse file tree 3 files changed +34
-0
lines changed
tensorflow/lite/micro/esp Expand file tree Collapse file tree 3 files changed +34
-0
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,11 @@ set(srcs_micro
29
29
"${tfmicro_dir} /recording_micro_allocator.cc"
30
30
"${tfmicro_dir} /system_setup.cc" )
31
31
32
+ list (REMOVE_ITEM srcs_micro
33
+ "${tfmicro_dir} /micro_time.cc" )
34
+ list (APPEND srcs_micro
35
+ "${tfmicro_dir} /esp/micro_time.cc" )
36
+
32
37
file (GLOB src_micro_frontend
33
38
"${tfmicro_frontend_dir} /*.c"
34
39
"${tfmicro_frontend_dir} /*.cc" )
Original file line number Diff line number Diff line change @@ -40,6 +40,10 @@ python3 tensorflow/lite/micro/tools/project_generation/create_tflm_tree.py \
40
40
/bin/cp -r " ${TFLITE_LIB_DIR} " /tensorflow/lite/micro/kernels/esp_nn \
41
41
" ${TEMP_DIR} " /tflm-out/tensorflow/lite/micro/kernels/
42
42
43
+ # Backup `micro/esp` directory to new tree
44
+ /bin/cp -r " ${TFLITE_LIB_DIR} " /tensorflow/lite/micro/esp \
45
+ " ${TEMP_DIR} " /tflm-out/tensorflow/lite/micro/
46
+
43
47
cd " ${TFLITE_LIB_DIR} "
44
48
rm -rf tensorflow
45
49
rm -rf third_party
Original file line number Diff line number Diff line change
1
+ /* Copyright 2020 The TensorFlow Authors. All Rights Reserved.
2
+
3
+ Licensed under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License.
5
+ You may obtain a copy of the License at
6
+
7
+ http://www.apache.org/licenses/LICENSE-2.0
8
+
9
+ Unless required by applicable law or agreed to in writing, software
10
+ distributed under the License is distributed on an "AS IS" BASIS,
11
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ See the License for the specific language governing permissions and
13
+ limitations under the License.
14
+ ==============================================================================*/
15
+
16
+ #include < esp_timer.h>
17
+ #include " tensorflow/lite/micro/micro_time.h"
18
+
19
+ namespace tflite {
20
+
21
+ uint32_t ticks_per_second () { return 1000000 ; }
22
+
23
+ uint32_t GetCurrentTimeTicks () { return esp_timer_get_time (); }
24
+
25
+ } // namespace tflite
You can’t perform that action at this time.
0 commit comments