diff options
| author | lin <[email protected]> | 2017-09-20 12:42:23 +0800 |
|---|---|---|
| committer | lin <[email protected]> | 2017-09-20 12:42:23 +0800 |
| commit | 96b1da173edb42aab35d65cbd27ba982ce278a70 (patch) | |
| tree | c09df39861dcc602a28752c8771c53bd8248f0c0 | |
| parent | e8eaaed1fea72444d91012e24951669f818c123a (diff) | |
Modified not use c99
| -rw-r--r-- | bsp/apollo2/board/uart.c | 13 | ||||
| -rw-r--r-- | bsp/apollo2/libraries/drivers/hal/am_hal_cachectrl.c | 24 | ||||
| -rw-r--r-- | bsp/apollo2/project.uvprojx | 40 | ||||
| -rw-r--r-- | bsp/apollo2/template.uvprojx | 6 |
4 files changed, 47 insertions, 36 deletions
diff --git a/bsp/apollo2/board/uart.c b/bsp/apollo2/board/uart.c index 80a8f98d1d..3a9242ab55 100644 --- a/bsp/apollo2/board/uart.c +++ b/bsp/apollo2/board/uart.c @@ -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); diff --git a/bsp/apollo2/libraries/drivers/hal/am_hal_cachectrl.c b/bsp/apollo2/libraries/drivers/hal/am_hal_cachectrl.c index 23c7164418..26c41a22e3 100644 --- a/bsp/apollo2/libraries/drivers/hal/am_hal_cachectrl.c +++ b/bsp/apollo2/libraries/drivers/hal/am_hal_cachectrl.c @@ -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 }; //***************************************************************************** diff --git a/bsp/apollo2/project.uvprojx b/bsp/apollo2/project.uvprojx index 6e5bcba4b4..a528b27b90 100644 --- a/bsp/apollo2/project.uvprojx +++ b/bsp/apollo2/project.uvprojx @@ -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,14 +417,9 @@ <GroupName>Applications</GroupName> <Files> <File> - <FileName>application.c</FileName> - <FileType>1</FileType> - <FilePath>applications\application.c</FilePath> - </File> - <File> - <FileName>startup.c</FileName> + <FileName>main.c</FileName> <FileType>1</FileType> - <FilePath>applications\startup.c</FilePath> + <FilePath>applications\main.c</FilePath> </File> </Files> </Group> @@ -432,19 +427,29 @@ <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> @@ -627,6 +632,11 @@ <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> <FilePath>..\..\components\drivers\serial\serial.c</FilePath> diff --git a/bsp/apollo2/template.uvprojx b/bsp/apollo2/template.uvprojx index eef72b7995..29ce82bf53 100644 --- a/bsp/apollo2/template.uvprojx +++ b/bsp/apollo2/template.uvprojx @@ -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> |
