generated from Zengtudor/stm32F10xExp
update
This commit is contained in:
parent
8199ee4c5d
commit
8f264cce0f
9
EventRecorderStub.scvd
Normal file
9
EventRecorderStub.scvd
Normal file
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<component_viewer schemaVersion="0.1" xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="Component_Viewer.xsd">
|
||||
|
||||
<component name="EventRecorderStub" version="1.0.0"/> <!--name and version of the component-->
|
||||
<events>
|
||||
</events>
|
||||
|
||||
</component_viewer>
|
@ -115,6 +115,26 @@
|
||||
<pMon>STLink\ST-LINKIII-KEIL_SWO.dll</pMon>
|
||||
</DebugOpt>
|
||||
<TargetDriverDllRegistry>
|
||||
<SetRegEntry>
|
||||
<Number>0</Number>
|
||||
<Key>ARMRTXEVENTFLAGS</Key>
|
||||
<Name>-L70 -Z18 -C0 -M0 -T1</Name>
|
||||
</SetRegEntry>
|
||||
<SetRegEntry>
|
||||
<Number>0</Number>
|
||||
<Key>DLGTARM</Key>
|
||||
<Name>(1010=-1,-1,-1,-1,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1009=-1,-1,-1,-1,0)</Name>
|
||||
</SetRegEntry>
|
||||
<SetRegEntry>
|
||||
<Number>0</Number>
|
||||
<Key>ARMDBGFLAGS</Key>
|
||||
<Name></Name>
|
||||
</SetRegEntry>
|
||||
<SetRegEntry>
|
||||
<Number>0</Number>
|
||||
<Key>DLGUARM</Key>
|
||||
<Name>(105=-1,-1,-1,-1,0)</Name>
|
||||
</SetRegEntry>
|
||||
<SetRegEntry>
|
||||
<Number>0</Number>
|
||||
<Key>ST-LINKIII-KEIL_SWO</Key>
|
||||
@ -126,19 +146,36 @@
|
||||
<Name>UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0STM32F10x_128 -FS08000000 -FL020000 -FP0($$Device:STM32F103C8$Flash\STM32F10x_128.FLM))</Name>
|
||||
</SetRegEntry>
|
||||
</TargetDriverDllRegistry>
|
||||
<Breakpoint/>
|
||||
<Breakpoint>
|
||||
<Bp>
|
||||
<Number>0</Number>
|
||||
<Type>0</Type>
|
||||
<LineNumber>21</LineNumber>
|
||||
<EnabledFlag>1</EnabledFlag>
|
||||
<Address>0</Address>
|
||||
<ByteObject>0</ByteObject>
|
||||
<HtxType>0</HtxType>
|
||||
<ManyObjects>0</ManyObjects>
|
||||
<SizeOfObject>0</SizeOfObject>
|
||||
<BreakByAccess>0</BreakByAccess>
|
||||
<BreakIfRCount>0</BreakIfRCount>
|
||||
<Filename>.\Src\main.cpp</Filename>
|
||||
<ExecCommand></ExecCommand>
|
||||
<Expression></Expression>
|
||||
</Bp>
|
||||
</Breakpoint>
|
||||
<Tracepoint>
|
||||
<THDelay>0</THDelay>
|
||||
</Tracepoint>
|
||||
<DebugFlag>
|
||||
<trace>0</trace>
|
||||
<periodic>1</periodic>
|
||||
<aLwin>0</aLwin>
|
||||
<aLwin>1</aLwin>
|
||||
<aCover>0</aCover>
|
||||
<aSer1>0</aSer1>
|
||||
<aSer2>0</aSer2>
|
||||
<aPa>0</aPa>
|
||||
<viewmode>0</viewmode>
|
||||
<viewmode>1</viewmode>
|
||||
<vrSel>0</vrSel>
|
||||
<aSym>0</aSym>
|
||||
<aTbox>0</aTbox>
|
||||
|
@ -52,7 +52,7 @@
|
||||
<OutputName>test</OutputName>
|
||||
<CreateExecutable>1</CreateExecutable>
|
||||
<CreateLib>0</CreateLib>
|
||||
<CreateHexFile>0</CreateHexFile>
|
||||
<CreateHexFile>1</CreateHexFile>
|
||||
<DebugInformation>1</DebugInformation>
|
||||
<BrowseInformation>1</BrowseInformation>
|
||||
<ListingPath>.\Listings\</ListingPath>
|
||||
@ -133,12 +133,12 @@
|
||||
<UseExternalTool>0</UseExternalTool>
|
||||
<RunIndependent>0</RunIndependent>
|
||||
<UpdateFlashBeforeDebugging>1</UpdateFlashBeforeDebugging>
|
||||
<Capability>0</Capability>
|
||||
<DriverSelection>-1</DriverSelection>
|
||||
<Capability>1</Capability>
|
||||
<DriverSelection>4096</DriverSelection>
|
||||
</Flash1>
|
||||
<bUseTDR>1</bUseTDR>
|
||||
<Flash2>BIN\UL2CM3.DLL</Flash2>
|
||||
<Flash3></Flash3>
|
||||
<Flash3>"" ()</Flash3>
|
||||
<Flash4></Flash4>
|
||||
<pFcarmOut></pFcarmOut>
|
||||
<pFcarmGrp></pFcarmGrp>
|
||||
@ -311,7 +311,7 @@
|
||||
</ArmAdsMisc>
|
||||
<Cads>
|
||||
<interw>1</interw>
|
||||
<Optim>1</Optim>
|
||||
<Optim>3</Optim>
|
||||
<oTime>0</oTime>
|
||||
<SplitLS>0</SplitLS>
|
||||
<OneElfS>1</OneElfS>
|
||||
|
@ -10,16 +10,19 @@ int main(){
|
||||
zt::Oled oled(RCC_APB2Periph_GPIOB,GPIOB,GPIO_Pin_8,GPIO_Pin_9);
|
||||
oled.ShowString(1, 1, "Hello,world!")
|
||||
.ShowString(2, 1, "by Zengtudor")
|
||||
.ShowString(3, 1, "From BDFS")
|
||||
.ShowString(4, 1, " EEC-RPD");
|
||||
.ShowString(3, 1, "From BDFS EECRPD")
|
||||
.ShowString(4, 1, "time:");
|
||||
|
||||
u32 delayTime = 500;
|
||||
u32 time = 0;
|
||||
while(true){
|
||||
time++;
|
||||
leda0.setOn();
|
||||
ledc13.setOff();
|
||||
delay_ms(delayTime);
|
||||
leda0.setOff();
|
||||
ledc13.setOn();
|
||||
delay_ms(delayTime);
|
||||
oled.ShowUNum(4, 6, time,10);
|
||||
}
|
||||
}
|
@ -4,6 +4,9 @@
|
||||
#include "stm32f10x_gpio.h"
|
||||
#include "stm32f10x_rcc.h"
|
||||
#include "OLED_Font.h"
|
||||
#include <cstdint>
|
||||
#include <list>
|
||||
#include <vector>
|
||||
|
||||
namespace zt{
|
||||
class Oled{
|
||||
@ -242,7 +245,7 @@ namespace zt{
|
||||
* @param Length 要显示数字的长度,范围:1~10
|
||||
* @retval 无
|
||||
*/
|
||||
Oled& ShowNum(uint8_t Line, uint8_t Column, uint32_t Number, uint8_t Length)
|
||||
Oled& ShowUNum(uint8_t Line, uint8_t Column, uint32_t Number, uint8_t Length)
|
||||
{
|
||||
uint8_t i;
|
||||
for (i = 0; i < Length; i++)
|
||||
@ -251,6 +254,18 @@ namespace zt{
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
Oled&ShowUNum(const uint8_t line, const uint8_t column, uint8_t number){
|
||||
std::list<char> chars;
|
||||
while(number>0){
|
||||
chars.push_front(number%10);
|
||||
number/=10;
|
||||
}
|
||||
std::list<char>::iterator it = chars.begin();
|
||||
for(uint8_t i=0;i<chars.size();i++){
|
||||
ShowChar(line, column+i, *(it++));
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief OLED显示数字(十进制,带符号数)
|
||||
|
Loading…
Reference in New Issue
Block a user