Modified not use c99

This commit is contained in:
lin 2017-09-20 12:42:23 +08:00
parent e8eaaed1fe
commit 96b1da173e
4 changed files with 47 additions and 36 deletions

View File

@ -55,11 +55,11 @@ struct am_uart
*/ */
am_hal_uart_config_t g_sUartConfig = am_hal_uart_config_t g_sUartConfig =
{ {
.ui32BaudRate = 115200, 115200, // ui32BaudRate
.ui32DataBits = AM_HAL_UART_DATA_BITS_8, AM_HAL_UART_DATA_BITS_8, // ui32DataBits
.bTwoStopBits = false, false, // bTwoStopBits
.ui32Parity = AM_HAL_UART_PARITY_NONE, AM_HAL_UART_PARITY_NONE, // ui32Parity
.ui32FlowCtrl = AM_HAL_UART_FLOW_CTRL_NONE, AM_HAL_UART_FLOW_CTRL_NONE, // ui32FlowCtrl
}; };
/** /**
@ -246,9 +246,10 @@ static int am_getc(struct rt_serial_device *serial)
static void uart_isr(struct rt_serial_device *serial) static void uart_isr(struct rt_serial_device *serial)
{ {
uint32_t status; uint32_t status;
struct am_uart* uart;
RT_ASSERT(serial != RT_NULL); RT_ASSERT(serial != RT_NULL);
struct am_uart *uart = (struct am_uart *) serial->parent.user_data; uart = (struct am_uart *) serial->parent.user_data;
RT_ASSERT(uart != RT_NULL); RT_ASSERT(uart != RT_NULL);

View File

@ -57,18 +57,18 @@
//***************************************************************************** //*****************************************************************************
const am_hal_cachectrl_config_t am_hal_cachectrl_defaults = const am_hal_cachectrl_config_t am_hal_cachectrl_defaults =
{ {
.ui32EnableCache = 1, 1, // ui32EnableCache
.ui32LRU = 0, 0, // ui32LRU
.ui32EnableNCregions = 0, 0, // ui32EnableNCregions
.ui32Config = AM_HAL_CACHECTRL_CACHECFG_CONFIG_2WAY_512, AM_HAL_CACHECTRL_CACHECFG_CONFIG_2WAY_512, // ui32Config
.ui32SerialCacheMode = 0, 0, // ui32SerialCacheMode
.ui32FlashCachingEnables = 3, 3, // ui32FlashCachingEnables
.ui32EnableCacheClockGating = 1, 1, // ui32EnableCacheClockGating
.ui32EnableLightSleep = 0, 0, // ui32EnableLightSleep
.ui32Dly = 1, 1, // ui32Dly
.ui32SMDly = 1, 1, // ui32SMDly
.ui32EnableDataClockGating = 1, 1, // ui32EnableDataClockGating
.ui32EnableCacheMonitoring = 0, 0, // ui32EnableCacheMonitoring
}; };
//***************************************************************************** //*****************************************************************************

View File

@ -79,7 +79,7 @@
<nStopB2X>0</nStopB2X> <nStopB2X>0</nStopB2X>
</BeforeMake> </BeforeMake>
<AfterMake> <AfterMake>
<RunUserProg1>0</RunUserProg1> <RunUserProg1>1</RunUserProg1>
<RunUserProg2>0</RunUserProg2> <RunUserProg2>0</RunUserProg2>
<UserProg1Name>fromelf --bin !L --output rtthread.bin</UserProg1Name> <UserProg1Name>fromelf --bin !L --output rtthread.bin</UserProg1Name>
<UserProg2Name></UserProg2Name> <UserProg2Name></UserProg2Name>
@ -354,7 +354,7 @@
<Optim>1</Optim> <Optim>1</Optim>
<oTime>0</oTime> <oTime>0</oTime>
<SplitLS>0</SplitLS> <SplitLS>0</SplitLS>
<OneElfS>1</OneElfS> <OneElfS>0</OneElfS>
<Strict>0</Strict> <Strict>0</Strict>
<EnumInt>0</EnumInt> <EnumInt>0</EnumInt>
<PlainCh>0</PlainCh> <PlainCh>0</PlainCh>
@ -363,7 +363,7 @@
<wLevel>2</wLevel> <wLevel>2</wLevel>
<uThumb>0</uThumb> <uThumb>0</uThumb>
<uSurpInc>0</uSurpInc> <uSurpInc>0</uSurpInc>
<uC99>1</uC99> <uC99>0</uC99>
<useXO>0</useXO> <useXO>0</useXO>
<v6Lang>1</v6Lang> <v6Lang>1</v6Lang>
<v6LangP>1</v6LangP> <v6LangP>1</v6LangP>
@ -373,7 +373,7 @@
<MiscControls></MiscControls> <MiscControls></MiscControls>
<Define>AM_PART_APOLLO2, AM_PACKAGE_BGA, keil</Define> <Define>AM_PART_APOLLO2, AM_PACKAGE_BGA, keil</Define>
<Undefine></Undefine> <Undefine></Undefine>
<IncludePath>applications;.;board;libraries\drivers;libraries\startup;..\..\include;..\..\libcpu\arm\cortex-m4;..\..\libcpu\arm\common;..\..\components\drivers\include;..\..\components\drivers\include;..\..\components\finsh</IncludePath> <IncludePath>applications;.;board;libraries\drivers;libraries\startup;..\..\include;..\..\libcpu\arm\cortex-m4;..\..\libcpu\arm\common;..\..\components\drivers\include;..\..\components\drivers\include;..\..\components\drivers\include;..\..\components\finsh</IncludePath>
</VariousControls> </VariousControls>
</Cads> </Cads>
<Aads> <Aads>
@ -417,34 +417,39 @@
<GroupName>Applications</GroupName> <GroupName>Applications</GroupName>
<Files> <Files>
<File> <File>
<FileName>application.c</FileName> <FileName>main.c</FileName>
<FileType>1</FileType> <FileType>1</FileType>
<FilePath>applications\application.c</FilePath> <FilePath>applications\main.c</FilePath>
</File>
<File>
<FileName>startup.c</FileName>
<FileType>1</FileType>
<FilePath>applications\startup.c</FilePath>
</File> </File>
</Files> </Files>
</Group> </Group>
<Group> <Group>
<GroupName>Board</GroupName> <GroupName>Board</GroupName>
<Files> <Files>
<File>
<FileName>adc.c</FileName>
<FileType>1</FileType>
<FilePath>board\adc.c</FilePath>
</File>
<File> <File>
<FileName>board.c</FileName> <FileName>board.c</FileName>
<FileType>1</FileType> <FileType>1</FileType>
<FilePath>board\board.c</FilePath> <FilePath>board\board.c</FilePath>
</File> </File>
<File> <File>
<FileName>hw_led.c</FileName> <FileName>gpio.c</FileName>
<FileType>1</FileType> <FileType>1</FileType>
<FilePath>board\hw_led.c</FilePath> <FilePath>board\gpio.c</FilePath>
</File> </File>
<File> <File>
<FileName>hw_uart.c</FileName> <FileName>led.c</FileName>
<FileType>1</FileType> <FileType>1</FileType>
<FilePath>board\hw_uart.c</FilePath> <FilePath>board\led.c</FilePath>
</File>
<File>
<FileName>uart.c</FileName>
<FileType>1</FileType>
<FilePath>board\uart.c</FilePath>
</File> </File>
</Files> </Files>
</Group> </Group>
@ -626,6 +631,11 @@
<Group> <Group>
<GroupName>DeviceDrivers</GroupName> <GroupName>DeviceDrivers</GroupName>
<Files> <Files>
<File>
<FileName>pin.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\components\drivers\misc\pin.c</FilePath>
</File>
<File> <File>
<FileName>serial.c</FileName> <FileName>serial.c</FileName>
<FileType>1</FileType> <FileType>1</FileType>

View File

@ -79,7 +79,7 @@
<nStopB2X>0</nStopB2X> <nStopB2X>0</nStopB2X>
</BeforeMake> </BeforeMake>
<AfterMake> <AfterMake>
<RunUserProg1>0</RunUserProg1> <RunUserProg1>1</RunUserProg1>
<RunUserProg2>0</RunUserProg2> <RunUserProg2>0</RunUserProg2>
<UserProg1Name>fromelf --bin !L --output rtthread.bin</UserProg1Name> <UserProg1Name>fromelf --bin !L --output rtthread.bin</UserProg1Name>
<UserProg2Name></UserProg2Name> <UserProg2Name></UserProg2Name>
@ -354,7 +354,7 @@
<Optim>1</Optim> <Optim>1</Optim>
<oTime>0</oTime> <oTime>0</oTime>
<SplitLS>0</SplitLS> <SplitLS>0</SplitLS>
<OneElfS>1</OneElfS> <OneElfS>0</OneElfS>
<Strict>0</Strict> <Strict>0</Strict>
<EnumInt>0</EnumInt> <EnumInt>0</EnumInt>
<PlainCh>0</PlainCh> <PlainCh>0</PlainCh>
@ -363,7 +363,7 @@
<wLevel>2</wLevel> <wLevel>2</wLevel>
<uThumb>0</uThumb> <uThumb>0</uThumb>
<uSurpInc>0</uSurpInc> <uSurpInc>0</uSurpInc>
<uC99>1</uC99> <uC99>0</uC99>
<useXO>0</useXO> <useXO>0</useXO>
<v6Lang>1</v6Lang> <v6Lang>1</v6Lang>
<v6LangP>1</v6LangP> <v6LangP>1</v6LangP>