From a9312568cde771d4b970445e1f66a04fabb64d56 Mon Sep 17 00:00:00 2001 From: QuakeGod <QuakeGod@sina.com> Date: 星期三, 01 二月 2023 14:07:14 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/Radio' into dev1 --- Src/main.c | 25 +++++++++++++++++-------- 1 files changed, 17 insertions(+), 8 deletions(-) diff --git a/Src/main.c b/Src/main.c index c1a7ec3..dd15b74 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" @@ -193,7 +193,11 @@ /* USER CODE BEGIN SysInit */ TickFreq=10000; //Tick棰戠巼 InituS(TickFreq); +<<<<<<< HEAD // HAL_SYSTICK_Config(HAL_RCC_GetHCLKFreq()/TickFreq); //閲嶆柊瀹氫箟SysTick鐨勯鐜� +======= + // HAL_SYSTICK_Config(HAL_RCC_GetHCLKFreq()/TickFreq); //閲嶆柊瀹氫箟SysTick鐨勯鐜囷拷 +>>>>>>> origin/Radio /* USER CODE END SysInit */ @@ -214,8 +218,13 @@ else{bKBusMaster=0;bKBusSlave=1;} nChilds=nStationID; FP0_Init(); +<<<<<<< HEAD #elif (BOARD_TYPE == 15) nStationID=KMem.EffJumperSW&0x0f; +======= +#elif (BOARD_TYPE == 15 || BOARD_TYPE == 16) + nAddr=KMem.EffJumperSW&0x0f; +>>>>>>> origin/Radio if (KMem.EffJumperSW == 0x1f) {bKBusRepeater=1;bKBusMaster=1;bKBusSlave=0;} else if ((KMem.EffJumperSW&0x10)!=0) {bKBusMaster=1;bKBusSlave=0;} else{bKBusMaster=0;bKBusSlave=1;} @@ -294,7 +303,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 +318,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 +352,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 +381,7 @@ } //*/ -#if (BOARD_TYPE == 15) +#if (BOARD_TYPE == 15 || BOARD_TYPE == 16) Radio.IrqProcess( ); // Process Radio IRQ #endif @@ -425,7 +434,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 +495,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