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 =
{
.ui32BaudRate = 115200,
.ui32DataBits = AM_HAL_UART_DATA_BITS_8,
.bTwoStopBits = false,
.ui32Parity = AM_HAL_UART_PARITY_NONE,
.ui32FlowCtrl = AM_HAL_UART_FLOW_CTRL_NONE,
115200, // ui32BaudRate
AM_HAL_UART_DATA_BITS_8, // ui32DataBits
false, // bTwoStopBits
AM_HAL_UART_PARITY_NONE, // ui32Parity
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)
{
uint32_t status;
struct am_uart* uart;
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);

View File

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

View File

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

View File

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