配置按键输入成功
This commit is contained in:
@@ -72,6 +72,74 @@ miscInfo:
|
|||||||
uid: d92a06a9fb4c340402d39197c79d1252
|
uid: d92a06a9fb4c340402d39197c79d1252
|
||||||
targets:
|
targets:
|
||||||
Debug:
|
Debug:
|
||||||
|
cppPreprocessAttrs:
|
||||||
|
defineList:
|
||||||
|
- USE_STDPERIPH_DRIVER
|
||||||
|
- STM32F10X_HD
|
||||||
|
- DEBUG
|
||||||
|
incList:
|
||||||
|
- App/Inc
|
||||||
|
- Board
|
||||||
|
- VoiletBspStm32F10x/Bsp/Inc
|
||||||
|
- VoiletBspStm32F10x/StdLib/Inc
|
||||||
|
- VoiletBspStm32F10x/System/Cmsis/Inc
|
||||||
|
- VoiletBspStm32F10x/System
|
||||||
|
- VoiletBspStm32F10x/ThirdParty/LetterShellV3/Inc
|
||||||
|
libList: []
|
||||||
|
excludeList: []
|
||||||
|
settings:
|
||||||
|
debugger: cortex-debug
|
||||||
|
toolchain: GCC
|
||||||
|
toolchainConfigMap:
|
||||||
|
GCC:
|
||||||
|
archExtensions: ""
|
||||||
|
cpuType: Cortex-M3
|
||||||
|
floatingPointHardware: none
|
||||||
|
options:
|
||||||
|
version: 5
|
||||||
|
afterBuildTasks: []
|
||||||
|
asm-compiler:
|
||||||
|
ASM_FLAGS: ""
|
||||||
|
beforeBuildTasks: []
|
||||||
|
c/cpp-compiler:
|
||||||
|
CXX_FLAGS: ""
|
||||||
|
C_FLAGS: ""
|
||||||
|
language-c: c11
|
||||||
|
language-cpp: c++11
|
||||||
|
one-elf-section-per-data: true
|
||||||
|
one-elf-section-per-function: true
|
||||||
|
optimization: level-debug
|
||||||
|
warnings: all-warnings
|
||||||
|
global:
|
||||||
|
$float-abi-type: hard
|
||||||
|
misc-control: ""
|
||||||
|
not-use-syscalls: true
|
||||||
|
output-debug-info: enable
|
||||||
|
use-newlib-nano: true
|
||||||
|
linker:
|
||||||
|
$outputTaskExcludes:
|
||||||
|
- .bin
|
||||||
|
LD_FLAGS: ""
|
||||||
|
LIB_FLAGS: -lm
|
||||||
|
output-format: elf
|
||||||
|
remove-unused-input-sections: true
|
||||||
|
scatterFilePath: VoiletBspStm32F10x/System/LinkScripts/Gcc/stm32_flash_ze.ld
|
||||||
|
storageLayout:
|
||||||
|
RAM: []
|
||||||
|
ROM: []
|
||||||
|
useCustomScatterFile: true
|
||||||
|
uploadConfigMap:
|
||||||
|
JLink:
|
||||||
|
baseAddr: ""
|
||||||
|
bin: ""
|
||||||
|
cpuInfo:
|
||||||
|
cpuName: STM32F103ZE
|
||||||
|
vendor: ST
|
||||||
|
otherCmds: ""
|
||||||
|
proType: 1
|
||||||
|
speed: 8000
|
||||||
|
uploader: JLink
|
||||||
|
Release:
|
||||||
cppPreprocessAttrs:
|
cppPreprocessAttrs:
|
||||||
defineList:
|
defineList:
|
||||||
- USE_STDPERIPH_DRIVER
|
- USE_STDPERIPH_DRIVER
|
||||||
|
|||||||
@@ -18,3 +18,6 @@ options:
|
|||||||
Debug:
|
Debug:
|
||||||
files: {}
|
files: {}
|
||||||
virtualPathFiles: {}
|
virtualPathFiles: {}
|
||||||
|
Release:
|
||||||
|
files: {}
|
||||||
|
virtualPathFiles: {}
|
||||||
|
|||||||
Vendored
+17
@@ -0,0 +1,17 @@
|
|||||||
|
{
|
||||||
|
"version": "0.2.0",
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
"cwd": "${workspaceRoot}",
|
||||||
|
"type": "cortex-debug",
|
||||||
|
"request": "launch",
|
||||||
|
"name": "Debug: JLINK",
|
||||||
|
"servertype": "jlink",
|
||||||
|
"interface": "swd",
|
||||||
|
"executable": "Output/Debug/Stm32F10xTmp.elf",
|
||||||
|
"runToEntryPoint": "main",
|
||||||
|
"device": "STM32F103ZE",
|
||||||
|
"toolchainPrefix": "arm-none-eabi"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
+8
-1
@@ -8,6 +8,8 @@
|
|||||||
#include "Bsp.h"
|
#include "Bsp.h"
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
|
|
||||||
|
int8_t DiTbl[DI_NUM];
|
||||||
|
|
||||||
int main(void)
|
int main(void)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -15,9 +17,14 @@ int main(void)
|
|||||||
|
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
|
for (uint8_t i = 0; i < DI_NUM; i++)
|
||||||
|
{
|
||||||
|
DiTbl[i] = DiGet(i);
|
||||||
|
}
|
||||||
|
|
||||||
LedToggle(LED0);
|
LedToggle(LED0);
|
||||||
DelayMs(100);
|
DelayMs(100);
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
EXIT_APP
|
||||||
}
|
}
|
||||||
+7
-5
@@ -17,13 +17,15 @@
|
|||||||
#define LED_NUM 2 // LED灯数量
|
#define LED_NUM 2 // LED灯数量
|
||||||
enum {
|
enum {
|
||||||
LED0 = 0,
|
LED0 = 0,
|
||||||
LED1
|
LED1,
|
||||||
};
|
};
|
||||||
|
|
||||||
#define DI_NUM 0 //数字信号输入通道数量
|
#define DI_NUM 3 // 数字信号输入通道数量
|
||||||
// enum {
|
enum {
|
||||||
//
|
KEY_WK_UP = 0,
|
||||||
// };
|
KEY_0,
|
||||||
|
KEY_1,
|
||||||
|
};
|
||||||
|
|
||||||
#define DO_NUM 0 // 数字信号输出通道数量
|
#define DO_NUM 0 // 数字信号输出通道数量
|
||||||
// enum {
|
// enum {
|
||||||
|
|||||||
Executable
BIN
Binary file not shown.
Reference in New Issue
Block a user