Browse Source

solve the compile problem of tflite in xiuos

master
Wang_Weigen 10 months ago
parent
commit
5b47a83022
  1. 16
      APP_Framework/Applications/knowing_app/Kconfig
  2. 3
      APP_Framework/Applications/knowing_app/Makefile
  3. 7
      APP_Framework/Applications/knowing_app/mnist/Makefile
  4. 1
      APP_Framework/Applications/knowing_app/mnist/main.cpp
  5. 31
      APP_Framework/Applications/knowing_app/mnist/mnistmain.c
  6. 2
      APP_Framework/Framework/Makefile
  7. 11
      APP_Framework/Framework/knowing/Makefile
  8. 1
      APP_Framework/Framework/knowing/tensorflow-lite/Kconfig
  9. 3
      APP_Framework/Framework/knowing/tensorflow-lite/Makefile
  10. 90
      APP_Framework/Framework/knowing/tensorflow-lite/tensorflow-lite-for-mcu/Makefile
  11. 4
      APP_Framework/Framework/knowing/tensorflow-lite/tensorflow-lite-for-mcu/tf_fini_fix.c
  12. 9
      APP_Framework/lib/app_newlib/fs_syscalls.c
  13. 2
      APP_Framework/lib/app_newlib/task_syscalls.c
  14. 14
      Ubiquitous/XiUOS/arch/risc-v/shared/kswitch.h
  15. 6
      Ubiquitous/XiUOS/board/kd233/link_userspace.lds
  16. 8
      Ubiquitous/XiUOS/path_app.mk
  17. 27
      Ubiquitous/XiUOS/path_kernel.mk
  18. 2
      Ubiquitous/XiUOS/resources/can/drv_can.c
  19. 2
      Ubiquitous/XiUOS/resources/i2c/drv_i2c.c
  20. 8
      Ubiquitous/XiUOS/resources/include/bus.h
  21. 2
      Ubiquitous/XiUOS/resources/include/bus_can.h
  22. 2
      Ubiquitous/XiUOS/resources/include/bus_i2c.h
  23. 2
      Ubiquitous/XiUOS/resources/include/bus_lcd.h
  24. 2
      Ubiquitous/XiUOS/resources/include/bus_pin.h
  25. 2
      Ubiquitous/XiUOS/resources/include/bus_rtc.h
  26. 2
      Ubiquitous/XiUOS/resources/include/bus_serial.h
  27. 2
      Ubiquitous/XiUOS/resources/include/bus_spi.h
  28. 2
      Ubiquitous/XiUOS/resources/include/bus_touch.h
  29. 2
      Ubiquitous/XiUOS/resources/include/bus_usb.h
  30. 2
      Ubiquitous/XiUOS/resources/lcd/drv_lcd.c
  31. 2
      Ubiquitous/XiUOS/resources/pin/drv_pin.c
  32. 2
      Ubiquitous/XiUOS/resources/rtc/drv_rtc.c
  33. 2
      Ubiquitous/XiUOS/resources/serial/drv_serial.c
  34. 2
      Ubiquitous/XiUOS/resources/spi/drv_spi.c
  35. 2
      Ubiquitous/XiUOS/resources/touch/drv_touch.c
  36. 2
      Ubiquitous/XiUOS/resources/usb/drv_usb.c

16
APP_Framework/Applications/knowing_app/Kconfig

@ -1,7 +1,13 @@
menu "knowing app"
source "$APP_DIR/Applications/knowing_app/mnist/Kconfig"
source "$APP_DIR/Applications/knowing_app/face_detect/Kconfig"
source "$APP_DIR/Applications/knowing_app/instrusion_detect/Kconfig"
source "$APP_DIR/Applications/knowing_app/helmet_detect/Kconfig"
source "$APP_DIR/Applications/knowing_app/iris_ml_demo/Kconfig"
menuconfig APPLICATION_KNOWING
bool "Using knowing apps"
default n
if APPLICATION_KNOWING
source "$APP_DIR/Applications/knowing_app/mnist/Kconfig"
source "$APP_DIR/Applications/knowing_app/face_detect/Kconfig"
source "$APP_DIR/Applications/knowing_app/instrusion_detect/Kconfig"
source "$APP_DIR/Applications/knowing_app/helmet_detect/Kconfig"
source "$APP_DIR/Applications/knowing_app/iris_ml_demo/Kconfig"
endif
endmenu

3
APP_Framework/Applications/knowing_app/Makefile

@ -0,0 +1,3 @@
SRC_DIR := mnist
include $(KERNEL_ROOT)/compiler.mk

7
APP_Framework/Applications/knowing_app/mnist/Makefile

@ -0,0 +1,7 @@
SRC_FILES := \
main.cpp \
mnistmain.c
CPPPATHS += -I.
include $(KERNEL_ROOT)/compiler.mk

1
APP_Framework/Applications/knowing_app/mnist/main.cpp

@ -1,3 +1,4 @@
#include <cstdio>
#include <transform.h>
#include <stdio.h>

31
APP_Framework/Applications/knowing_app/mnist/mnistmain.c

@ -0,0 +1,31 @@
/*
* Copyright (c) 2020 AIIT XUOS Lab
* XiOS is licensed under Mulan PSL v2.
* You can use this software according to the terms and conditions of the Mulan PSL v2.
* You may obtain a copy of Mulan PSL v2 at:
* http://license.coscl.org.cn/MulanPSL2
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
* See the Mulan PSL v2 for more details.
*/
/**
* @file: mnistmain.c
* @brief: start mnist function
* @version: 1.0
* @author: AIIT XUOS Lab
* @date: 2021/4/30
*
*/
#include <transform.h>
void mnist_app(void);
int tfmnist(void) {
mnist_app();
}
// #ifndef SEPARATE_COMPILE
// SHELL_EXPORT_CMD(SHELL_CMD_PERMISSION(0)|SHELL_CMD_TYPE(SHELL_TYPE_CMD_FUNC)|SHELL_CMD_PARAM_NUM(0)|SHELL_CMD_DISABLE_RETURN, tfmnist, tfmnist, run mnist demo of tflite);
// #endif

2
APP_Framework/Framework/Makefile

@ -9,7 +9,7 @@ ifeq ($(CONFIG_SUPPORT_CONNECTION_FRAMEWORK),y)
endif
ifeq ($(CONFIG_SUPPORT_KNOWING_FRAMEWORK),y)
SRC_DIR += know
SRC_DIR += knowing
endif
ifeq ($(CONFIG_SUPPORT_CONTROL_FRAMEWORK),y)

11
APP_Framework/Framework/knowing/Makefile

@ -1,13 +1,4 @@
SRC_DIR :=
ifeq ($(CONFIG_SUPPORT_KNOW_FRAMEWORK),y)
ifeq ($(CONFIG_USING_TFLITE_MNIST),y)
SRC_DIR += tflite_mnist
endif
ifeq ($(CONFIG_USING_TFLITE_SIN),y)
SRC_DIR += tflite_sin
endif
endif
SRC_DIR := tensorflow-lite
include $(KERNEL_ROOT)/compiler.mk

1
APP_Framework/Framework/knowing/tensorflow-lite/Kconfig

@ -1,6 +1,7 @@
menuconfig USING_TENSORFLOWLITEMICRO
bool "Tensorflow Lite for Micro"
select RT_USING_CPLUSPLUS
select LIB_CPLUSPLUS
default n
if USING_TENSORFLOWLITEMICRO

3
APP_Framework/Framework/knowing/tensorflow-lite/Makefile

@ -0,0 +1,3 @@
SRC_DIR := tensorflow-lite-for-mcu
include $(KERNEL_ROOT)/compiler.mk

90
APP_Framework/Framework/knowing/tensorflow-lite/tensorflow-lite-for-mcu/Makefile

@ -0,0 +1,90 @@
TFLITE_SRCS = \
source/tensorflow/lite/micro/all_ops_resolver.cc \
source/tensorflow/lite/micro/debug_log.cc \
source/tensorflow/lite/micro/memory_helpers.cc \
source/tensorflow/lite/micro/micro_allocator.cc \
source/tensorflow/lite/micro/micro_error_reporter.cc \
source/tensorflow/lite/micro/micro_interpreter.cc \
source/tensorflow/lite/micro/micro_profiler.cc \
source/tensorflow/lite/micro/micro_string.cc \
source/tensorflow/lite/micro/micro_time.cc \
source/tensorflow/lite/micro/micro_utils.cc \
source/tensorflow/lite/micro/recording_micro_allocator.cc \
source/tensorflow/lite/micro/recording_simple_memory_allocator.cc \
source/tensorflow/lite/micro/simple_memory_allocator.cc \
source/tensorflow/lite/micro/test_helpers.cc \
source/tensorflow/lite/micro/benchmarks/keyword_scrambled_model_data.cc \
source/tensorflow/lite/micro/memory_planner/greedy_memory_planner.cc \
source/tensorflow/lite/micro/memory_planner/linear_memory_planner.cc \
source/tensorflow/lite/micro/testing/test_conv_model.cc \
source/tensorflow/lite/c/common.c \
source/tensorflow/lite/core/api/error_reporter.cc \
source/tensorflow/lite/core/api/flatbuffer_conversions.cc \
source/tensorflow/lite/core/api/op_resolver.cc \
source/tensorflow/lite/core/api/tensor_utils.cc \
source/tensorflow/lite/kernels/internal/quantization_util.cc \
source/tensorflow/lite/kernels/kernel_util.cc \
source/tensorflow/lite/schema/schema_utils.cc \
source/tensorflow/lite/micro/kernels/activations.cc \
source/tensorflow/lite/micro/kernels/arg_min_max.cc \
source/tensorflow/lite/micro/kernels/ceil.cc \
source/tensorflow/lite/micro/kernels/circular_buffer.cc \
source/tensorflow/lite/micro/kernels/comparisons.cc \
source/tensorflow/lite/micro/kernels/concatenation.cc \
source/tensorflow/lite/micro/kernels/conv_test_common.cc \
source/tensorflow/lite/micro/kernels/dequantize.cc \
source/tensorflow/lite/micro/kernels/detection_postprocess.cc \
source/tensorflow/lite/micro/kernels/elementwise.cc \
source/tensorflow/lite/micro/kernels/ethosu.cc \
source/tensorflow/lite/micro/kernels/flexbuffers_generated_data.cc \
source/tensorflow/lite/micro/kernels/floor.cc \
source/tensorflow/lite/micro/kernels/hard_swish.cc \
source/tensorflow/lite/micro/kernels/kernel_runner.cc \
source/tensorflow/lite/micro/kernels/kernel_util.cc \
source/tensorflow/lite/micro/kernels/l2norm.cc \
source/tensorflow/lite/micro/kernels/logical.cc \
source/tensorflow/lite/micro/kernels/logistic.cc \
source/tensorflow/lite/micro/kernels/maximum_minimum.cc \
source/tensorflow/lite/micro/kernels/neg.cc \
source/tensorflow/lite/micro/kernels/pack.cc \
source/tensorflow/lite/micro/kernels/pad.cc \
source/tensorflow/lite/micro/kernels/prelu.cc \
source/tensorflow/lite/micro/kernels/quantize.cc \
source/tensorflow/lite/micro/kernels/quantize_common.cc \
source/tensorflow/lite/micro/kernels/reduce.cc \
source/tensorflow/lite/micro/kernels/reshape.cc \
source/tensorflow/lite/micro/kernels/resize_nearest_neighbor.cc \
source/tensorflow/lite/micro/kernels/round.cc \
source/tensorflow/lite/micro/kernels/shape.cc \
source/tensorflow/lite/micro/kernels/split.cc \
source/tensorflow/lite/micro/kernels/split_v.cc \
source/tensorflow/lite/micro/kernels/strided_slice.cc \
source/tensorflow/lite/micro/kernels/sub.cc \
source/tensorflow/lite/micro/kernels/svdf_common.cc \
source/tensorflow/lite/micro/kernels/tanh.cc \
source/tensorflow/lite/micro/kernels/transpose_conv.cc \
source/tensorflow/lite/micro/kernels/unpack.cc \
source/tensorflow/lite/micro/kernels/normal/add.cc \
source/tensorflow/lite/micro/kernels/normal/conv.cc \
source/tensorflow/lite/micro/kernels/normal/depthwise_conv.cc \
source/tensorflow/lite/micro/kernels/normal/fully_connected.cc \
source/tensorflow/lite/micro/kernels/normal/mul.cc \
source/tensorflow/lite/micro/kernels/normal/pooling.cc \
source/tensorflow/lite/micro/kernels/normal/softmax.cc \
source/tensorflow/lite/micro/kernels/normal/svdf.cc
# ifeq ($(CONFIG_INTELLIGENT_TFLITE),y)
ifeq ($(CONFIG_USING_TENSORFLOWLITEMICRO),y)
SRC_FILES := $(TFLITE_SRCS) tf_fini_fix.c
CPPPATHS += \
-Isource \
-Isource/third_party/gemmlowp \
-Isource/third_party/flatbuffers/include \
-Isource/third_party/ruy
DEFINES += -DTF_LITE_USE_GLOBAL_CMATH_FUNCTIONS \
-DTF_LITE_USE_GLOBAL_MAX \
-DTF_LITE_USE_GLOBAL_MIN \
-DTF_LITE_STATIC_MEMORY
endif
include $(KERNEL_ROOT)/compiler.mk

4
APP_Framework/Framework/knowing/tensorflow-lite/tensorflow-lite-for-mcu/tf_fini_fix.c

@ -0,0 +1,4 @@
// fix '_fini' not found on gcc risvc 8.2.0
#if (__riscv == 1) && (__GNUC__ == 8) && (__GNUC_MINOR__ == 2)
void _fini (void) {}
#endif

9
APP_Framework/lib/app_newlib/fs_syscalls.c

@ -96,3 +96,12 @@ _ssize_t _write_r(struct _reent *ptr, int fd, const void *buf, size_t nbytes)
{
return write(fd, buf, nbytes);
}
void exit(int __status);
void _exit(int __status){}
void _kill(int k)
{}
int _getpid(void)
{
}

2
APP_Framework/lib/app_newlib/task_syscalls.c

@ -40,4 +40,4 @@ void abort(void)
}
while (1);
}
}

14
Ubiquitous/XiUOS/arch/risc-v/shared/kswitch.h

@ -242,7 +242,7 @@ static inline unsigned long KSwitch0(unsigned int knum)
{
uintptr_t param[1] = {0};
uint8_t num = 0;
SERVICETABLE[knum].fun(knum, param, num);
return SERVICETABLE[knum].fun(knum, param, num);
}
static inline unsigned long KSwitch1(unsigned int knum, unsigned long arg1)
@ -250,7 +250,7 @@ static inline unsigned long KSwitch1(unsigned int knum, unsigned long arg1)
uintptr_t param[1] = {0};
uint8_t num = 0;
param[0] = arg1;
SERVICETABLE[knum].fun(knum, param, num );
return SERVICETABLE[knum].fun(knum, param, num );
}
@ -261,7 +261,7 @@ static inline unsigned long KSwitch2(unsigned int knum, unsigned long arg1,
uint8_t num = 0;
param[0] = arg1;
param[1] = arg2;
SERVICETABLE[knum].fun(knum, param, num );
return SERVICETABLE[knum].fun(knum, param, num );
}
@ -274,7 +274,7 @@ static inline unsigned long KSwitch3(unsigned int knum, unsigned long arg1,
param[1] = arg2;
param[2] = arg3;
SERVICETABLE[knum].fun(knum, param, num );
return SERVICETABLE[knum].fun(knum, param, num );
}
static inline unsigned long KSwitch4(unsigned int knum, unsigned long arg1,
@ -287,7 +287,7 @@ static inline unsigned long KSwitch4(unsigned int knum, unsigned long arg1,
param[1] = arg2;
param[2] = arg3;
param[3] = arg4;
SERVICETABLE[knum].fun(knum, param, num );
return SERVICETABLE[knum].fun(knum, param, num );
}
static inline unsigned long KSwitch5(unsigned int knum, unsigned long arg1,
@ -301,7 +301,7 @@ static inline unsigned long KSwitch5(unsigned int knum, unsigned long arg1,
param[2] = arg3;
param[3] = arg4;
param[4] = arg5;
SERVICETABLE[knum].fun(knum, param, num );
return SERVICETABLE[knum].fun(knum, param, num );
}
static inline unsigned long KSwitch6(unsigned int knum, unsigned long arg1,
@ -317,7 +317,7 @@ static inline unsigned long KSwitch6(unsigned int knum, unsigned long arg1,
param[3] = arg4;
param[4] = arg5;
param[5] = arg6;
SERVICETABLE[knum].fun(knum, param, num );
return SERVICETABLE[knum].fun(knum, param, num );
}
#endif

6
Ubiquitous/XiUOS/board/kd233/link_userspace.lds

@ -31,6 +31,12 @@ SECTIONS
*(.rodata .rodata*)
*(.glue_7)
*(.glue_7t)
PROVIDE(__ctors_start__ = .);
KEEP (*(SORT(.init_array.*)))
KEEP (*(.init_array))
PROVIDE(__ctors_end__ = .);
PROVIDE(_uetext = ABSOLUTE(.));
} > usram

8
Ubiquitous/XiUOS/path_app.mk

@ -15,6 +15,14 @@ ifeq ($(CONFIG_SUPPORT_CONNECTION_FRAMEWORK), y)
APPPATHS += -I$(KERNEL_ROOT)/../../APP_Framework/Framework/connection #
endif
ifeq ($(CONFIG_SUPPORT_KNOWING_FRAMEWORK), y)
APPPATHS += -I$(KERNEL_ROOT)/../../APP_Framework/Framework/knowing #
APPPATHS += -I$(KERNEL_ROOT)/../../APP_Framework/Framework/knowing/tensorflow-lite/tensorflow-lite-for-mcu/source #
APPPATHS += -I$(KERNEL_ROOT)/../../APP_Framework/Framework/knowing/tensorflow-lite/tensorflow-lite-for-mcu/source/third_party/gemmlowp #
APPPATHS += -I$(KERNEL_ROOT)/../../APP_Framework/Framework/knowing/tensorflow-lite/tensorflow-lite-for-mcu/source/third_party/flatbuffers/include #
APPPATHS += -I$(KERNEL_ROOT)/../../APP_Framework/Framework/knowing/tensorflow-lite/tensorflow-lite-for-mcu/source/third_party/ruy #
endif
COMPILE_APP:
@$(eval CPPPATHS=$(APPPATHS))
@echo $(SRC_APP_DIR)

27
Ubiquitous/XiUOS/path_kernel.mk

@ -164,15 +164,40 @@ ifeq ($(CONFIG_FS_CH376), y)
KERNELPATHS +=-I$(KERNEL_ROOT)/fs/compatibility_ch376 #
endif
ifeq ($(CONFIG_TRANSFORM_LAYER_ATTRIUBUTE), y)
ifeq ($(CONFIG_ADD_XIUOS_FETURES), y)
KERNELPATHS += -I$(KERNEL_ROOT)/../../APP_Framework/Framework/transform_layer/xiuos/user_api/posix_support/include #
KERNELPATHS += -I$(KERNEL_ROOT)/../../APP_Framework/Framework/sensor #
KERNELPATHS += -I$(KERNEL_ROOT)/../../APP_Framework/Framework/transform_layer/xiuos #
endif
ifeq ($(CONFIG_ADD_NUTTX_FETURES), y)
#
endif
ifeq ($(CONFIG_ADD_RTTHREAD_FETURES), y)
#
endif
endif
KERNELPATHS += -I$(KERNEL_ROOT)/../../APP_Framework/Applications/general_functions/list #
ifeq ($(CONFIG_SUPPORT_SENSOR_FRAMEWORK), y)
KERNELPATHS += -I$(KERNEL_ROOT)/../../APP_Framework/Framework/sensor #
endif
ifeq ($(CONFIG_SUPPORT_CONNECTION_FRAMEWORK), y)
KERNELPATHS += -I$(KERNEL_ROOT)/../../APP_Framework/Framework/connection #
endif
ifeq ($(CONFIG_SUPPORT_KNOWING_FRAMEWORK), y)
KERNELPATHS += -I$(KERNEL_ROOT)/../../APP_Framework/Framework/knowing #
KERNELPATHS += -I$(KERNEL_ROOT)/../../APP_Framework/Framework/knowing/tensorflow-lite/tensorflow-lite-for-mcu/source #
KERNELPATHS += -I$(KERNEL_ROOT)/../../APP_Framework/Framework/knowing/tensorflow-lite/tensorflow-lite-for-mcu/source/third_party/gemmlowp #
KERNELPATHS += -I$(KERNEL_ROOT)/../../APP_Framework/Framework/knowing/tensorflow-lite/tensorflow-lite-for-mcu/source/third_party/flatbuffers/include #
KERNELPATHS += -I$(KERNEL_ROOT)/../../APP_Framework/Framework/knowing/tensorflow-lite/tensorflow-lite-for-mcu/source/third_party/ruy #
endif
ifeq ($(CONFIG_CRYPTO), y)
KERNELPATHS += -I$(KERNEL_ROOT)/framework/security/crypto/include #
endif

2
Ubiquitous/XiUOS/resources/can/drv_can.c

@ -30,7 +30,7 @@ static void CanDrvLinkInit()
}
/*Find the regiter driver*/
DriverType CanDriverFind(const char *drv_name, enum DriverType drv_type)
DriverType CanDriverFind(const char *drv_name, enum DriverType_e drv_type)
{
NULL_PARAM_CHECK(drv_name);

2
Ubiquitous/XiUOS/resources/i2c/drv_i2c.c

@ -30,7 +30,7 @@ static void I2cDrvLinkInit()
}
/*Find the regiter driver*/
DriverType I2cDriverFind(const char *drv_name, enum DriverType drv_type)
DriverType I2cDriverFind(const char *drv_name, enum DriverType_e drv_type)
{
NULL_PARAM_CHECK(drv_name);

8
Ubiquitous/XiUOS/resources/include/bus.h

@ -38,7 +38,7 @@ typedef struct HardwareDev *HardwareDevType;
typedef struct Driver *DriverType;
/* need to add new bus type in ../tool/shell/letter-shell/cmd.c, ensure ShowBus cmd supported*/
enum BusType
enum BusType_e
{
TYPE_I2C_BUS = 0,
TYPE_SPI_BUS,
@ -86,7 +86,7 @@ enum DevState
DEV_UNINSTALL,
};
enum DriverType
enum DriverType_e
{
TYPE_I2C_DRV = 0,
TYPE_SPI_DRV,
@ -168,7 +168,7 @@ struct HardwareDev
struct Driver
{
int8 drv_name[NAME_NUM_MAX];
enum DriverType driver_type;
enum DriverType_e driver_type;
enum DriverState driver_state;
uint32 (*configure)(void *drv, struct BusConfigureInfo *configure_info);
@ -182,7 +182,7 @@ struct Driver
struct Bus
{
int8 bus_name[NAME_NUM_MAX];
enum BusType bus_type;
enum BusType_e bus_type;
enum BusState bus_state;
int32 (*match)(struct Driver *driver, struct HardwareDev *device);

2
Ubiquitous/XiUOS/resources/include/bus_can.h

@ -58,7 +58,7 @@ int CanDriverAttachToBus(const char *drv_name, const char *bus_name);
int CanDriverRegister(struct Driver *driver);
/*Find the register driver*/
DriverType CanDriverFind(const char *drv_name, enum DriverType drv_type);
DriverType CanDriverFind(const char *drv_name, enum DriverType_e drv_type);
#ifdef __cplusplus
}

2
Ubiquitous/XiUOS/resources/include/bus_i2c.h

@ -81,7 +81,7 @@ int I2cDriverAttachToBus(const char *drv_name, const char *bus_name);
int I2cDriverRegister(struct Driver *driver);
/*Find the register driver*/
DriverType I2cDriverFind(const char *drv_name, enum DriverType drv_type);
DriverType I2cDriverFind(const char *drv_name, enum DriverType_e drv_type);
#ifdef __cplusplus
}

2
Ubiquitous/XiUOS/resources/include/bus_lcd.h

@ -56,7 +56,7 @@ int LcdDriverAttachToBus(const char *drv_name, const char *bus_name);
int LcdDriverRegister(struct Driver *driver);
/*Find the register driver*/
DriverType LcdDriverFind(const char *drv_name, enum DriverType drv_type);
DriverType LcdDriverFind(const char *drv_name, enum DriverType_e drv_type);
#ifdef __cplusplus
}

2
Ubiquitous/XiUOS/resources/include/bus_pin.h

@ -56,7 +56,7 @@ int PinDriverAttachToBus(const char *drv_name, const char *bus_name);
int PinDriverRegister(struct Driver *driver);
/*Find the register driver*/
DriverType PinDriverFind(const char *drv_name, enum DriverType drv_type);
DriverType PinDriverFind(const char *drv_name, enum DriverType_e drv_type);
/*Get the initialized Pin bus*/
BusType PinBusInitGet(void);

2
Ubiquitous/XiUOS/resources/include/bus_rtc.h

@ -86,7 +86,7 @@ int RtcDriverAttachToBus(const char *drv_name, const char *bus_name);
int RtcDriverRegister(struct Driver *driver);
/*Find the register driver*/
DriverType RtcDriverFind(const char *drv_name, enum DriverType drv_type);
DriverType RtcDriverFind(const char *drv_name, enum DriverType_e drv_type);
/*Set Rtc time and date*/
int RtcDrvSetFunction(char *driver_name, struct RtcSetParam *rtc_set_param);

2
Ubiquitous/XiUOS/resources/include/bus_serial.h

@ -103,7 +103,7 @@ int SerialDriverAttachToBus(const char *drv_name, const char *bus_name);
int SerialDriverRegister(struct Driver *driver);
/*Find the regiter driver*/
DriverType SerialDriverFind(const char *drv_name, enum DriverType drv_type);
DriverType SerialDriverFind(const char *drv_name, enum DriverType_e drv_type);
#ifdef __cplusplus
}

2
Ubiquitous/XiUOS/resources/include/bus_spi.h

@ -57,7 +57,7 @@ int SpiDriverAttachToBus(const char *drv_name, const char *bus_name);
int SpiDriverRegister(struct Driver *driver);
/*Find the register driver*/
DriverType SpiDriverFind(const char *drv_name, enum DriverType drv_type);
DriverType SpiDriverFind(const char *drv_name, enum DriverType_e drv_type);
#ifdef __cplusplus
}

2
Ubiquitous/XiUOS/resources/include/bus_touch.h

@ -56,7 +56,7 @@ int TouchDriverAttachToBus(const char *drv_name, const char *bus_name);
int TouchDriverRegister(struct Driver *driver);
/*Find the register driver*/
DriverType TouchDriverFind(const char *drv_name, enum DriverType drv_type);
DriverType TouchDriverFind(const char *drv_name, enum DriverType_e drv_type);
#ifdef __cplusplus
}

2
Ubiquitous/XiUOS/resources/include/bus_usb.h

@ -59,7 +59,7 @@ int UsbDriverAttachToBus(const char *drv_name, const char *bus_name);
int UsbDriverRegister(struct Driver *driver);
/*Find the register driver*/
DriverType UsbDriverFind(const char *drv_name, enum DriverType drv_type);
DriverType UsbDriverFind(const char *drv_name, enum DriverType_e drv_type);
#ifdef __cplusplus
}

2
Ubiquitous/XiUOS/resources/lcd/drv_lcd.c

@ -29,7 +29,7 @@ static void LcdDrvLinkInit()
InitDoubleLinkList(&lcddrv_linklist);
}
DriverType LcdDriverFind(const char *drv_name, enum DriverType drv_type)
DriverType LcdDriverFind(const char *drv_name, enum DriverType_e drv_type)
{
NULL_PARAM_CHECK(drv_name);

2
Ubiquitous/XiUOS/resources/pin/drv_pin.c

@ -29,7 +29,7 @@ static void PinDrvLinkInit()
InitDoubleLinkList(&pindrv_linklist);
}
DriverType PinDriverFind(const char *drv_name, enum DriverType DrvType)
DriverType PinDriverFind(const char *drv_name, enum DriverType_e DrvType)
{
NULL_PARAM_CHECK(drv_name);

2
Ubiquitous/XiUOS/resources/rtc/drv_rtc.c

@ -29,7 +29,7 @@ static void RtcDrvLinkInit()
InitDoubleLinkList(&rtcdrv_linklist);
}
DriverType RtcDriverFind(const char *drv_name, enum DriverType drv_type)
DriverType RtcDriverFind(const char *drv_name, enum DriverType_e drv_type)
{
NULL_PARAM_CHECK(drv_name);

2
Ubiquitous/XiUOS/resources/serial/drv_serial.c

@ -29,7 +29,7 @@ static void SerialDrvLinkInit()
InitDoubleLinkList(&serialdrv_linklist);
}
DriverType SerialDriverFind(const char *drv_name, enum DriverType drv_type)
DriverType SerialDriverFind(const char *drv_name, enum DriverType_e drv_type)
{
NULL_PARAM_CHECK(drv_name);

2
Ubiquitous/XiUOS/resources/spi/drv_spi.c

@ -29,7 +29,7 @@ static void SpiDrvLinkInit()
InitDoubleLinkList(&spidrv_linklist);
}
DriverType SpiDriverFind(const char *drv_name, enum DriverType drv_type)
DriverType SpiDriverFind(const char *drv_name, enum DriverType_e drv_type)
{
NULL_PARAM_CHECK(drv_name);

2
Ubiquitous/XiUOS/resources/touch/drv_touch.c

@ -29,7 +29,7 @@ static void TouchDrvLinkInit()
InitDoubleLinkList(&touchdrv_linklist);
}
DriverType TouchDriverFind(const char *drv_name, enum DriverType drv_type)
DriverType TouchDriverFind(const char *drv_name, enum DriverType_e drv_type)
{
NULL_PARAM_CHECK(drv_name);

2
Ubiquitous/XiUOS/resources/usb/drv_usb.c

@ -30,7 +30,7 @@ static void UsbDrvLinkInit()
}
/*Find the regiter driver*/
DriverType UsbDriverFind(const char *drv_name, enum DriverType drv_type)
DriverType UsbDriverFind(const char *drv_name, enum DriverType_e drv_type)
{
NULL_PARAM_CHECK(drv_name);

Loading…
Cancel
Save