diff --git a/bsp/apollo2/board/uart.c b/bsp/apollo2/board/uart.c index 80a8f98d1dae3ff385b5436f2bd0277669dd5a71..3a9242ab55756c528d92abf14462761a205bccd3 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 23c716441860e39a2e3a2329d31309f2eedf9465..26c41a22e31eac34f948be1660af49c2048b36d7 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 6e5bcba4b4ceccc62dcb761011630c0febfe8079..a528b27b90bda3af56ca590ec91d02e24258e3a2 100644 --- a/bsp/apollo2/project.uvprojx +++ b/bsp/apollo2/project.uvprojx @@ -79,7 +79,7 @@ 0 - 0 + 1 0 fromelf --bin !L --output rtthread.bin @@ -354,7 +354,7 @@ 1 0 0 - 1 + 0 0 0 0 @@ -363,7 +363,7 @@ 2 0 0 - 1 + 0 0 1 1 @@ -373,7 +373,7 @@ AM_PART_APOLLO2, AM_PACKAGE_BGA, keil - applications;.;board;libraries\drivers;libraries\startup;..\..\include;..\..\libcpu\arm\cortex-m4;..\..\libcpu\arm\common;..\..\components\drivers\include;..\..\components\drivers\include;..\..\components\finsh + 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 @@ -417,34 +417,39 @@ Applications - application.c - 1 - applications\application.c - - - startup.c + main.c 1 - applications\startup.c + applications\main.c Board + + adc.c + 1 + board\adc.c + board.c 1 board\board.c - hw_led.c + gpio.c 1 - board\hw_led.c + board\gpio.c - hw_uart.c + led.c 1 - board\hw_uart.c + board\led.c + + + uart.c + 1 + board\uart.c @@ -626,6 +631,11 @@ DeviceDrivers + + pin.c + 1 + ..\..\components\drivers\misc\pin.c + serial.c 1 diff --git a/bsp/apollo2/template.uvprojx b/bsp/apollo2/template.uvprojx index eef72b7995c11e873494c59837d3f5fa5242bebd..29ce82bf535895b321b010522485f900d5d4c21d 100644 --- a/bsp/apollo2/template.uvprojx +++ b/bsp/apollo2/template.uvprojx @@ -79,7 +79,7 @@ 0 - 0 + 1 0 fromelf --bin !L --output rtthread.bin @@ -354,7 +354,7 @@ 1 0 0 - 1 + 0 0 0 0 @@ -363,7 +363,7 @@ 2 0 0 - 1 + 0 0 1 1