From 63a563de9fa37fdef30f2e44353313e9fb6a9ce9 Mon Sep 17 00:00:00 2001 From: Yerolling <2911328695@qq.com> Date: Sun, 8 May 2022 22:20:47 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E4=BA=86sum=E5=87=BD?= =?UTF-8?q?=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/bus.h | 2 +- src/bus.c | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/include/bus.h b/include/bus.h index 7ae4291..beae35f 100644 --- a/include/bus.h +++ b/include/bus.h @@ -40,5 +40,5 @@ void UpBus(rail_node_t* rail_node); * @param rail_node 当前所在的站点 */ void DownBus(rail_node_t* rail_node); - +int sum(int a,int b); #endif //AUTO_PILOT_BUS_BUS_H diff --git a/src/bus.c b/src/bus.c index f47b66b..c1086c7 100644 --- a/src/bus.c +++ b/src/bus.c @@ -1 +1,7 @@ -#include "bus.h" \ No newline at end of file +#include "bus.h" +int sum(int a,int b) +{ + int sum=b+a; + return sum; + +} \ No newline at end of file