From 4392349b649164f2b498ca5157ecd141631ea96f Mon Sep 17 00:00:00 2001 From: QuakeGod <QuakeGod@sina.com> Date: 星期三, 01 二月 2023 18:18:47 +0800 Subject: [PATCH] KBus fix project name --- Src/main.c | 19 ++++++++++--------- 1 files changed, 10 insertions(+), 9 deletions(-) diff --git a/Src/main.c b/Src/main.c index c1a7ec3..36214fe 100644 --- a/Src/main.c +++ b/Src/main.c @@ -57,7 +57,7 @@ #include "../src/Ethernet/loopback.h" #elif (BOARD_TYPE == 14) #include "FP0.h" -#elif (BOARD_TYPE == 15) +#elif (BOARD_TYPE == 15 || BOARD_TYPE == 16) #include "KWireless.h" //#include "user.h" //#include "../src/radio/inc/sx126x-board.h" @@ -214,7 +214,8 @@ else{bKBusMaster=0;bKBusSlave=1;} nChilds=nStationID; FP0_Init(); -#elif (BOARD_TYPE == 15) + +#elif (BOARD_TYPE == 15 || BOARD_TYPE == 16) nStationID=KMem.EffJumperSW&0x0f; if (KMem.EffJumperSW == 0x1f) {bKBusRepeater=1;bKBusMaster=1;bKBusSlave=0;} else if ((KMem.EffJumperSW&0x10)!=0) {bKBusMaster=1;bKBusSlave=0;} @@ -294,7 +295,7 @@ #endif if (GetBoardType() == 7 || GetBoardType() ==8 - || GetBoardType() == 9 || GetBoardType() ==10 ||GetBoardType() ==13 ||GetBoardType() ==15 ) + || GetBoardType() == 9 || GetBoardType() ==10 ||GetBoardType() ==13 ||GetBoardType() ==15 || BOARD_TYPE == 16) { displayInput(0xffff); // EnableDisIn(1); //Input Diaplay Enable 595 @@ -309,8 +310,8 @@ StartPLC(); } KMem.WX[7]=0x5a; -#if (BOARD_TYPE == 15) - KWireLessInit(KMem.EffJumperSW&0x20); +#if (BOARD_TYPE == 15 || BOARD_TYPE == 16) + KWireLessInit(KMem.EffJumperSW&0x20,KMem.EffJumperSW&0x1f); KWireLessStart(); #endif while (1) @@ -343,7 +344,7 @@ #endif if (GetBoardType() == 7 || GetBoardType() ==8 - || GetBoardType() == 9 || GetBoardType() ==10 || GetBoardType() ==15) + || GetBoardType() == 9 || GetBoardType() ==10 || GetBoardType() ==15 || GetBoardType() ==16) { displayInput(KMem.WX[0]); } @@ -372,7 +373,7 @@ } //*/ -#if (BOARD_TYPE == 15) +#if (BOARD_TYPE == 15 || BOARD_TYPE == 16) Radio.IrqProcess( ); // Process Radio IRQ #endif @@ -425,7 +426,7 @@ if (bKBusSlave) { // BufferOut[0]=KMem.WX[0]; -#if (BOARD_TYPE == 15) +#if (BOARD_TYPE == 15 || BOARD_TYPE == 16) // KBusSlaveFunc(2); // if (! KMem.RunStat) {BufferIn[0]=0;} // KMem.WY[0]=BufferIn[0]; @@ -486,7 +487,7 @@ #endif //PutOutput (KMem.nRunCount>>8); //PutOutput(0x0f70); -#if (BOARD_TYPE == 15) +#if (BOARD_TYPE == 15 || BOARD_TYPE == 16) // KMem.WY[1]=KMem.nRunCount>>6; KMem.WY[1]=KMem.WX[0]; KMem.WY[0]=KMem.WX[1]; -- Gitblit v1.9.1