blink
This commit is contained in:
parent
d716c72fb8
commit
0dab248a40
@ -29,7 +29,7 @@
|
|||||||
<option id="com.silabs.ide.si8051.keil.toolchain.category.general.debug.1285835962" name="Generate debug information" superClass="com.silabs.ide.si8051.keil.toolchain.category.general.debug" value="true" valueType="boolean"/>
|
<option id="com.silabs.ide.si8051.keil.toolchain.category.general.debug.1285835962" name="Generate debug information" superClass="com.silabs.ide.si8051.keil.toolchain.category.general.debug" value="true" valueType="boolean"/>
|
||||||
<option id="com.silabs.ide.si8051.keil.toolchain.category.general.extended_assembler.1124669083" name="Use Extended Assembler (AX51) instead of A51" superClass="com.silabs.ide.si8051.keil.toolchain.category.general.extended_assembler" value="true" valueType="boolean"/>
|
<option id="com.silabs.ide.si8051.keil.toolchain.category.general.extended_assembler.1124669083" name="Use Extended Assembler (AX51) instead of A51" superClass="com.silabs.ide.si8051.keil.toolchain.category.general.extended_assembler" value="true" valueType="boolean"/>
|
||||||
<option id="com.silabs.ide.si8051.keil.toolchain.category.general.extended_linker.1220060828" name="Use Extended Linker (LX51) instead of BL51" superClass="com.silabs.ide.si8051.keil.toolchain.category.general.extended_linker" value="true" valueType="boolean"/>
|
<option id="com.silabs.ide.si8051.keil.toolchain.category.general.extended_linker.1220060828" name="Use Extended Linker (LX51) instead of BL51" superClass="com.silabs.ide.si8051.keil.toolchain.category.general.extended_linker" value="true" valueType="boolean"/>
|
||||||
<option id="com.silabs.ide.si8051.keil.toolchain.category.general.memory_model.923432818" name="Memory model" superClass="com.silabs.ide.si8051.keil.toolchain.category.general.memory_model" value="com.silabs.ide.si8051.keil.toolchain.category.general.memory_model.large" valueType="enumerated"/>
|
<option id="com.silabs.ide.si8051.keil.toolchain.category.general.memory_model.923432818" name="Memory model" superClass="com.silabs.ide.si8051.keil.toolchain.category.general.memory_model" value="com.silabs.ide.si8051.keil.toolchain.category.general.memory_model.small" valueType="enumerated"/>
|
||||||
<targetPlatform binaryParser="com.silabs.ss.tool.ide.c8051.debug.OMF;com.silabs.ss.tool.ide.c8051.debug.OMF2;com.silabs.ss.framework.debugger.core.BIN;com.silabs.ss.framework.debugger.core.HEX;com.silabs.ss.framework.debugger.core.S37;com.silabs.ss.framework.debugger.core.EBL;com.silabs.ss.framework.debugger.core.GBL" id="com.silabs.ide.si8051.keil.targetplatform.1736873507" isAbstract="false" superClass="com.silabs.ide.si8051.keil.targetplatform"/>
|
<targetPlatform binaryParser="com.silabs.ss.tool.ide.c8051.debug.OMF;com.silabs.ss.tool.ide.c8051.debug.OMF2;com.silabs.ss.framework.debugger.core.BIN;com.silabs.ss.framework.debugger.core.HEX;com.silabs.ss.framework.debugger.core.S37;com.silabs.ss.framework.debugger.core.EBL;com.silabs.ss.framework.debugger.core.GBL" id="com.silabs.ide.si8051.keil.targetplatform.1736873507" isAbstract="false" superClass="com.silabs.ide.si8051.keil.targetplatform"/>
|
||||||
<builder buildPath="${workspace_loc:/efm8}/Keil 8051 v9.53 - Debug" id="com.silabs.ide.si8051.keil.builder.699981897" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Keil Builder" parallelBuildOn="false" superClass="com.silabs.ide.si8051.keil.builder"/>
|
<builder buildPath="${workspace_loc:/efm8}/Keil 8051 v9.53 - Debug" id="com.silabs.ide.si8051.keil.builder.699981897" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Keil Builder" parallelBuildOn="false" superClass="com.silabs.ide.si8051.keil.builder"/>
|
||||||
<tool id="com.silabs.ide.si8051.keil.toolchain.compiler.161237451" name="Keil 8051 Compiler" superClass="com.silabs.ide.si8051.keil.toolchain.compiler">
|
<tool id="com.silabs.ide.si8051.keil.toolchain.compiler.161237451" name="Keil 8051 Compiler" superClass="com.silabs.ide.si8051.keil.toolchain.compiler">
|
||||||
@ -50,7 +50,7 @@
|
|||||||
<listOptionValue builtIn="false" value=""${StudioSdkPath}/Lib/efm8_usbc/lib_usbc_pd/inc""/>
|
<listOptionValue builtIn="false" value=""${StudioSdkPath}/Lib/efm8_usbc/lib_usbc_pd/inc""/>
|
||||||
</option>
|
</option>
|
||||||
<option id="com.silabs.ide.si8051.keil.compiler.category.misc.extraflags.1584403236" name="Additional Flags" superClass="com.silabs.ide.si8051.keil.compiler.category.misc.extraflags" value="OA" valueType="string"/>
|
<option id="com.silabs.ide.si8051.keil.compiler.category.misc.extraflags.1584403236" name="Additional Flags" superClass="com.silabs.ide.si8051.keil.compiler.category.misc.extraflags" value="OA" valueType="string"/>
|
||||||
<option id="com.silabs.ide.si8051.keil.compiler.category.general.code.1474638890" name="Code size" superClass="com.silabs.ide.si8051.keil.compiler.category.general.code" value="com.silabs.ide.si8051.keil.compiler.category.general.code.small" valueType="enumerated"/>
|
<option id="com.silabs.ide.si8051.keil.compiler.category.general.code.1474638890" name="Code size" superClass="com.silabs.ide.si8051.keil.compiler.category.general.code" value="com.silabs.ide.si8051.keil.compiler.category.general.code.large" valueType="enumerated"/>
|
||||||
<inputType id="com.silabs.ide.si8051.keil.compiler.inputType.1048026013" superClass="com.silabs.ide.si8051.keil.compiler.inputType"/>
|
<inputType id="com.silabs.ide.si8051.keil.compiler.inputType.1048026013" superClass="com.silabs.ide.si8051.keil.compiler.inputType"/>
|
||||||
</tool>
|
</tool>
|
||||||
<tool command="AX51" id="com.silabs.ide.si8051.keil.toolchain.assembler.683449334" name="Keil 8051 Assembler" superClass="com.silabs.ide.si8051.keil.toolchain.assembler">
|
<tool command="AX51" id="com.silabs.ide.si8051.keil.toolchain.assembler.683449334" name="Keil 8051 Assembler" superClass="com.silabs.ide.si8051.keil.toolchain.assembler">
|
||||||
@ -77,7 +77,7 @@
|
|||||||
</toolChain>
|
</toolChain>
|
||||||
</folderInfo>
|
</folderInfo>
|
||||||
<sourceEntries>
|
<sourceEntries>
|
||||||
<entry excluding=".git/objects/info|.git/objects/pack|.git/refs/tags|lib/c8051f320|lib/c8051f326|lib/c8051f340|lib/c8051f380|lib/efm8ub2|lib/efm8ub3|lib/efm8ub4|src" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
|
<entry excluding="docs|lib/c8051f320|lib/c8051f326|lib/c8051f340|lib/c8051f380|lib/efm8ub2|lib/efm8ub3|lib/efm8ub4|.git/objects/info|.git/objects/pack|.git/refs/tags|src" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
|
||||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
|
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
|
||||||
</sourceEntries>
|
</sourceEntries>
|
||||||
</configuration>
|
</configuration>
|
||||||
@ -162,7 +162,7 @@
|
|||||||
</toolChain>
|
</toolChain>
|
||||||
</folderInfo>
|
</folderInfo>
|
||||||
<sourceEntries>
|
<sourceEntries>
|
||||||
<entry excluding=".git/objects/info|.git/objects/pack|.git/refs/tags|lib/c8051f320|lib/c8051f326|lib/c8051f340|lib/c8051f380|lib/efm8ub2|lib/efm8ub3|lib/efm8ub4|src" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
|
<entry excluding="docs|lib/c8051f320|lib/c8051f326|lib/c8051f340|lib/c8051f380|lib/efm8ub2|lib/efm8ub3|lib/efm8ub4|.git/objects/info|.git/objects/pack|.git/refs/tags|src" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
|
||||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
|
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
|
||||||
</sourceEntries>
|
</sourceEntries>
|
||||||
</configuration>
|
</configuration>
|
||||||
@ -170,7 +170,7 @@
|
|||||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||||
</cconfiguration>
|
</cconfiguration>
|
||||||
</storageModule>
|
</storageModule>
|
||||||
<storageModule moduleId="com.silabs.ss.framework.ide.project.core.cpp" project.generation="41" projectCommon.boardIds="brd5000a:0.0.0.A02" projectCommon.buildArtifactType="EXE" projectCommon.importModeId="COPY" projectCommon.partId="mcu.8051.efm8.ub1.efm8ub10f16g-b-qfn28" projectCommon.sdkId="com.silabs.sdk.8051:4.1.1._-963069327"/>
|
<storageModule moduleId="com.silabs.ss.framework.ide.project.core.cpp" project.generation="25" projectCommon.boardIds="brd5000a:0.0.0.A02" projectCommon.buildArtifactType="EXE" projectCommon.importModeId="COPY" projectCommon.partId="mcu.8051.efm8.ub1.efm8ub10f16g-b-qfn28" projectCommon.sdkId="com.silabs.sdk.8051:4.1.1._-963069327"/>
|
||||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||||
<project id="efm8.com.silabs.ss.framework.ide.project.core.cdt.cdtMbsProjectType.972220390" name="SLS CDT Project" projectType="com.silabs.ss.framework.ide.project.core.cdt.cdtMbsProjectType"/>
|
<project id="efm8.com.silabs.ss.framework.ide.project.core.cdt.cdtMbsProjectType.972220390" name="SLS CDT Project" projectType="com.silabs.ss.framework.ide.project.core.cdt.cdtMbsProjectType"/>
|
||||||
</storageModule>
|
</storageModule>
|
||||||
@ -184,5 +184,12 @@
|
|||||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.silabs.ide.si8051.keil.KeilScannerInfoCollector"/>
|
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.silabs.ide.si8051.keil.KeilScannerInfoCollector"/>
|
||||||
</scannerConfigBuildInfo>
|
</scannerConfigBuildInfo>
|
||||||
</storageModule>
|
</storageModule>
|
||||||
<storageModule moduleId="refreshScope"/>
|
<storageModule moduleId="refreshScope" versionNumber="2">
|
||||||
|
<configuration configurationName="Keil 8051 v9.53 - Debug">
|
||||||
|
<resource resourceType="PROJECT" workspacePath="/efm8"/>
|
||||||
|
</configuration>
|
||||||
|
<configuration configurationName="Keil 8051 v9.53 - Release">
|
||||||
|
<resource resourceType="PROJECT" workspacePath="/efm8"/>
|
||||||
|
</configuration>
|
||||||
|
</storageModule>
|
||||||
</cproject>
|
</cproject>
|
||||||
|
@ -11,8 +11,20 @@
|
|||||||
<property object="DefaultMode" propertyId="mode.diagramLocation" value="100, 100"/>
|
<property object="DefaultMode" propertyId="mode.diagramLocation" value="100, 100"/>
|
||||||
<property object="INTERRUPT_0" propertyId="ABPeripheral.included" value="true"/>
|
<property object="INTERRUPT_0" propertyId="ABPeripheral.included" value="true"/>
|
||||||
<property object="INTERRUPT_0" propertyId="interrupt.interruptenable.enableallinterrupts" value="Enabled"/>
|
<property object="INTERRUPT_0" propertyId="interrupt.interruptenable.enableallinterrupts" value="Enabled"/>
|
||||||
<property object="P0.0" propertyId="ports.settings.iomode" value="Digital Push-Pull Output"/>
|
<property object="P0.0" propertyId="ports.settings.skip" value="Skipped"/>
|
||||||
<property object="P0.0" propertyId="ports.settings.outputmode" value="Push-pull"/>
|
<property object="P0.1" propertyId="ports.settings.skip" value="Skipped"/>
|
||||||
|
<property object="P0.2" propertyId="ports.settings.skip" value="Skipped"/>
|
||||||
|
<property object="P0.3" propertyId="ports.settings.skip" value="Skipped"/>
|
||||||
|
<property object="P0.4" propertyId="ports.settings.iomode" value="Digital Push-Pull Output"/>
|
||||||
|
<property object="P0.4" propertyId="ports.settings.outputmode" value="Push-pull"/>
|
||||||
|
<property object="P1.4" propertyId="ports.settings.iomode" value="Digital Push-Pull Output"/>
|
||||||
|
<property object="P1.4" propertyId="ports.settings.outputmode" value="Push-pull"/>
|
||||||
|
<property object="P1.5" propertyId="ports.settings.iomode" value="Digital Push-Pull Output"/>
|
||||||
|
<property object="P1.5" propertyId="ports.settings.outputmode" value="Push-pull"/>
|
||||||
|
<property object="P1.6" propertyId="ports.settings.iomode" value="Digital Push-Pull Output"/>
|
||||||
|
<property object="P1.6" propertyId="ports.settings.outputmode" value="Push-pull"/>
|
||||||
|
<property object="P2.0" propertyId="ports.settings.iomode" value="Digital Push-Pull Output"/>
|
||||||
|
<property object="P2.0" propertyId="ports.settings.outputmode" value="Push-pull"/>
|
||||||
<property object="PBCFG_0" propertyId="pbcfg.settings.enablecrossbar" value="Enabled"/>
|
<property object="PBCFG_0" propertyId="pbcfg.settings.enablecrossbar" value="Enabled"/>
|
||||||
<property object="TIMER01_0" propertyId="ABPeripheral.included" value="true"/>
|
<property object="TIMER01_0" propertyId="ABPeripheral.included" value="true"/>
|
||||||
<property object="TIMER16_2" propertyId="ABPeripheral.included" value="true"/>
|
<property object="TIMER16_2" propertyId="ABPeripheral.included" value="true"/>
|
||||||
|
@ -18,6 +18,8 @@ extern void enter_DefaultMode_from_RESET(void);
|
|||||||
// $[Config(Per-Module Mode)Transition Prototypes]
|
// $[Config(Per-Module Mode)Transition Prototypes]
|
||||||
extern void WDT_0_enter_DefaultMode_from_RESET(void);
|
extern void WDT_0_enter_DefaultMode_from_RESET(void);
|
||||||
extern void PORTS_0_enter_DefaultMode_from_RESET(void);
|
extern void PORTS_0_enter_DefaultMode_from_RESET(void);
|
||||||
|
extern void PORTS_1_enter_DefaultMode_from_RESET(void);
|
||||||
|
extern void PORTS_2_enter_DefaultMode_from_RESET(void);
|
||||||
extern void PBCFG_0_enter_DefaultMode_from_RESET(void);
|
extern void PBCFG_0_enter_DefaultMode_from_RESET(void);
|
||||||
extern void CIP51_0_enter_DefaultMode_from_RESET(void);
|
extern void CIP51_0_enter_DefaultMode_from_RESET(void);
|
||||||
extern void CLOCK_0_enter_DefaultMode_from_RESET(void);
|
extern void CLOCK_0_enter_DefaultMode_from_RESET(void);
|
||||||
|
@ -58,3 +58,7 @@ extern SI_SEGMENT_VARIABLE(initstruct, const USBD_Init_TypeDef, SI_SEG_CODE);
|
|||||||
|
|
||||||
#endif // __SILICON_LABS_DESCRIPTORS_H
|
#endif // __SILICON_LABS_DESCRIPTORS_H
|
||||||
|
|
||||||
|
// $[HID Report Descriptors]
|
||||||
|
extern SI_SEGMENT_VARIABLE(ReportDescriptor0[34], const uint8_t, SI_SEG_CODE);
|
||||||
|
// [HID Report Descriptors]$
|
||||||
|
|
||||||
|
@ -28,6 +28,8 @@ extern void enter_DefaultMode_from_RESET(void) {
|
|||||||
uint8_t SFRPAGE_save = SFRPAGE;
|
uint8_t SFRPAGE_save = SFRPAGE;
|
||||||
WDT_0_enter_DefaultMode_from_RESET();
|
WDT_0_enter_DefaultMode_from_RESET();
|
||||||
PORTS_0_enter_DefaultMode_from_RESET();
|
PORTS_0_enter_DefaultMode_from_RESET();
|
||||||
|
PORTS_1_enter_DefaultMode_from_RESET();
|
||||||
|
PORTS_2_enter_DefaultMode_from_RESET();
|
||||||
PBCFG_0_enter_DefaultMode_from_RESET();
|
PBCFG_0_enter_DefaultMode_from_RESET();
|
||||||
CIP51_0_enter_DefaultMode_from_RESET();
|
CIP51_0_enter_DefaultMode_from_RESET();
|
||||||
CLOCK_0_enter_DefaultMode_from_RESET();
|
CLOCK_0_enter_DefaultMode_from_RESET();
|
||||||
@ -327,18 +329,18 @@ extern void PORTS_0_enter_DefaultMode_from_RESET(void) {
|
|||||||
|
|
||||||
// $[P0MDOUT - Port 0 Output Mode]
|
// $[P0MDOUT - Port 0 Output Mode]
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
- P0.0 output is push-pull
|
- P0.0 output is open-drain
|
||||||
- P0.1 output is open-drain
|
- P0.1 output is open-drain
|
||||||
- P0.2 output is open-drain
|
- P0.2 output is open-drain
|
||||||
- P0.3 output is open-drain
|
- P0.3 output is open-drain
|
||||||
- P0.4 output is open-drain
|
- P0.4 output is push-pull
|
||||||
- P0.5 output is open-drain
|
- P0.5 output is open-drain
|
||||||
- P0.6 output is open-drain
|
- P0.6 output is open-drain
|
||||||
- P0.7 output is open-drain
|
- P0.7 output is open-drain
|
||||||
***********************************************************************/
|
***********************************************************************/
|
||||||
P0MDOUT = P0MDOUT_B0__PUSH_PULL | P0MDOUT_B1__OPEN_DRAIN
|
P0MDOUT = P0MDOUT_B0__OPEN_DRAIN | P0MDOUT_B1__OPEN_DRAIN
|
||||||
| P0MDOUT_B2__OPEN_DRAIN | P0MDOUT_B3__OPEN_DRAIN
|
| P0MDOUT_B2__OPEN_DRAIN | P0MDOUT_B3__OPEN_DRAIN
|
||||||
| P0MDOUT_B4__OPEN_DRAIN | P0MDOUT_B5__OPEN_DRAIN
|
| P0MDOUT_B4__PUSH_PULL | P0MDOUT_B5__OPEN_DRAIN
|
||||||
| P0MDOUT_B6__OPEN_DRAIN | P0MDOUT_B7__OPEN_DRAIN;
|
| P0MDOUT_B6__OPEN_DRAIN | P0MDOUT_B7__OPEN_DRAIN;
|
||||||
// [P0MDOUT - Port 0 Output Mode]$
|
// [P0MDOUT - Port 0 Output Mode]$
|
||||||
|
|
||||||
@ -346,6 +348,20 @@ extern void PORTS_0_enter_DefaultMode_from_RESET(void) {
|
|||||||
// [P0MDIN - Port 0 Input Mode]$
|
// [P0MDIN - Port 0 Input Mode]$
|
||||||
|
|
||||||
// $[P0SKIP - Port 0 Skip]
|
// $[P0SKIP - Port 0 Skip]
|
||||||
|
/***********************************************************************
|
||||||
|
- P0.0 pin is skipped by the crossbar
|
||||||
|
- P0.1 pin is skipped by the crossbar
|
||||||
|
- P0.2 pin is skipped by the crossbar
|
||||||
|
- P0.3 pin is skipped by the crossbar
|
||||||
|
- P0.4 pin is not skipped by the crossbar
|
||||||
|
- P0.5 pin is not skipped by the crossbar
|
||||||
|
- P0.6 pin is not skipped by the crossbar
|
||||||
|
- P0.7 pin is not skipped by the crossbar
|
||||||
|
***********************************************************************/
|
||||||
|
P0SKIP = P0SKIP_B0__SKIPPED | P0SKIP_B1__SKIPPED | P0SKIP_B2__SKIPPED
|
||||||
|
| P0SKIP_B3__SKIPPED | P0SKIP_B4__NOT_SKIPPED
|
||||||
|
| P0SKIP_B5__NOT_SKIPPED | P0SKIP_B6__NOT_SKIPPED
|
||||||
|
| P0SKIP_B7__NOT_SKIPPED;
|
||||||
// [P0SKIP - Port 0 Skip]$
|
// [P0SKIP - Port 0 Skip]$
|
||||||
|
|
||||||
// $[P0MASK - Port 0 Mask]
|
// $[P0MASK - Port 0 Mask]
|
||||||
@ -358,9 +374,67 @@ extern void PORTS_0_enter_DefaultMode_from_RESET(void) {
|
|||||||
|
|
||||||
extern void PORTS_1_enter_DefaultMode_from_RESET(void) {
|
extern void PORTS_1_enter_DefaultMode_from_RESET(void) {
|
||||||
|
|
||||||
|
// $[P1 - Port 1 Pin Latch]
|
||||||
|
// [P1 - Port 1 Pin Latch]$
|
||||||
|
|
||||||
|
// $[P1MDOUT - Port 1 Output Mode]
|
||||||
|
/***********************************************************************
|
||||||
|
- P1.0 output is open-drain
|
||||||
|
- P1.1 output is open-drain
|
||||||
|
- P1.2 output is open-drain
|
||||||
|
- P1.3 output is open-drain
|
||||||
|
- P1.4 output is push-pull
|
||||||
|
- P1.5 output is push-pull
|
||||||
|
- P1.6 output is push-pull
|
||||||
|
- P1.7 output is open-drain
|
||||||
|
***********************************************************************/
|
||||||
|
P1MDOUT = P1MDOUT_B0__OPEN_DRAIN | P1MDOUT_B1__OPEN_DRAIN
|
||||||
|
| P1MDOUT_B2__OPEN_DRAIN | P1MDOUT_B3__OPEN_DRAIN
|
||||||
|
| P1MDOUT_B4__PUSH_PULL | P1MDOUT_B5__PUSH_PULL
|
||||||
|
| P1MDOUT_B6__PUSH_PULL | P1MDOUT_B7__OPEN_DRAIN;
|
||||||
|
// [P1MDOUT - Port 1 Output Mode]$
|
||||||
|
|
||||||
|
// $[P1MDIN - Port 1 Input Mode]
|
||||||
|
// [P1MDIN - Port 1 Input Mode]$
|
||||||
|
|
||||||
|
// $[P1SKIP - Port 1 Skip]
|
||||||
|
// [P1SKIP - Port 1 Skip]$
|
||||||
|
|
||||||
|
// $[P1MASK - Port 1 Mask]
|
||||||
|
// [P1MASK - Port 1 Mask]$
|
||||||
|
|
||||||
|
// $[P1MAT - Port 1 Match]
|
||||||
|
// [P1MAT - Port 1 Match]$
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
extern void PORTS_2_enter_DefaultMode_from_RESET(void) {
|
extern void PORTS_2_enter_DefaultMode_from_RESET(void) {
|
||||||
|
|
||||||
|
// $[P2 - Port 2 Pin Latch]
|
||||||
|
// [P2 - Port 2 Pin Latch]$
|
||||||
|
|
||||||
|
// $[P2MDOUT - Port 2 Output Mode]
|
||||||
|
/***********************************************************************
|
||||||
|
- P2.0 output is push-pull
|
||||||
|
- P2.1 output is open-drain
|
||||||
|
- P2.2 output is open-drain
|
||||||
|
- P2.3 output is open-drain
|
||||||
|
***********************************************************************/
|
||||||
|
P2MDOUT = P2MDOUT_B0__PUSH_PULL | P2MDOUT_B1__OPEN_DRAIN
|
||||||
|
| P2MDOUT_B2__OPEN_DRAIN | P2MDOUT_B3__OPEN_DRAIN;
|
||||||
|
// [P2MDOUT - Port 2 Output Mode]$
|
||||||
|
|
||||||
|
// $[P2MDIN - Port 2 Input Mode]
|
||||||
|
// [P2MDIN - Port 2 Input Mode]$
|
||||||
|
|
||||||
|
// $[P2SKIP - Port 2 Skip]
|
||||||
|
// [P2SKIP - Port 2 Skip]$
|
||||||
|
|
||||||
|
// $[P2MASK - Port 2 Mask]
|
||||||
|
// [P2MASK - Port 2 Mask]$
|
||||||
|
|
||||||
|
// $[P2MAT - Port 2 Match]
|
||||||
|
// [P2MAT - Port 2 Match]$
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7,11 +7,22 @@
|
|||||||
|
|
||||||
|
|
||||||
int main(void) {
|
int main(void) {
|
||||||
|
volatile int xdata i,j,k;
|
||||||
enter_DefaultMode_from_RESET();
|
enter_DefaultMode_from_RESET();
|
||||||
|
|
||||||
cprints("hello,world\r\n");
|
cprints("hello,world\r\n");
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
|
k++;
|
||||||
|
for (i = 0; i < 1000; i++)
|
||||||
|
{
|
||||||
|
for (j = 0; j < 100; j++)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
P1_B4 = i&1;
|
||||||
|
}
|
||||||
|
P1_B5 = k&1;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
void putf(char c)
|
void putf(char c)
|
||||||
{
|
{
|
||||||
uint8_t i;
|
uint8_t i;
|
||||||
SBUF0 = c;
|
SBUF1 = c;
|
||||||
// Blocking delay that works for 115200 baud on this device (<1ms)
|
// Blocking delay that works for 115200 baud on this device (<1ms)
|
||||||
for (i=0; i<200; i++){}
|
for (i=0; i<200; i++){}
|
||||||
for (i=0; i<200; i++){}
|
for (i=0; i<200; i++){}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user