Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: GR-PEACH_video GraphicsFramework R_BSP SDFileSystem_tmp mbed-rtos mbed
Diff: main.cpp
- Revision:
- 2:e79ddc136968
- Parent:
- 1:2f9f102b2b4c
- Child:
- 3:8489fb71f53d
--- a/main.cpp Tue May 24 08:01:44 2016 +0000 +++ b/main.cpp Tue May 24 11:20:55 2016 +0000 @@ -35,12 +35,12 @@ #define SCROLL_STEP_NUM (8) /* minimum 1 */ #define SCROLL_DIRECTION (-1) /* Select 1(left to right) or -1(right to left) */ #define LCD_SIZE WXGA /* Select SVGA, XGA, HD_720p or WXGA */ -#define MAX_JPEG_SIZE (1024 * 300) /*****************************/ #define FILE_NAME_LEN (64) #define TEXT_SIZE (64 + 1) //null-terminated #define FLD_PATH "/sd/" +#define MAX_JPEG_SIZE (1024 * 512) /* LCD Parameter */ #define LCD_INPUT_CLOCK (66.67f) @@ -95,19 +95,18 @@ DisplayBase Display; Canvas2D_ContextClass canvas2d; -static uint8_t user_frame_buffer[FRAME_BUFFER_STRIDE * LCD_PIXEL_HEIGHT]__attribute((aligned(32))); /* 32 bytes aligned */ -static uint8_t user_frame_buffer2[FRAME_BUFFER_STRIDE * LCD_PIXEL_HEIGHT]__attribute((aligned(32))); /* 32 bytes aligned */ +#if defined(__ICCARM__) +static uint8_t user_frame_buffer[FRAME_BUFFER_STRIDE * LCD_PIXEL_HEIGHT]@ 0x60100000; +static uint8_t user_frame_buffer2[FRAME_BUFFER_STRIDE * LCD_PIXEL_HEIGHT]@ 0x60500000; +static uint8_t JpegBuffer[2][MAX_JPEG_SIZE]@ 0x60800000; +#else +static uint8_t user_frame_buffer[FRAME_BUFFER_STRIDE * LCD_PIXEL_HEIGHT]__attribute((at(0x60100000))); +static uint8_t user_frame_buffer2[FRAME_BUFFER_STRIDE * LCD_PIXEL_HEIGHT]__attribute((at(0x60500000))); +static uint8_t JpegBuffer[2][MAX_JPEG_SIZE]__attribute((at(0x60800000))); +#endif static frame_buffer_t frame_buffer_info; static volatile int32_t vsync_count = 0; -#if defined(__ICCARM__) -#pragma data_alignment=8 -static uint8_t JpegBuffer[2][MAX_JPEG_SIZE]@ ".mirrorram"; //8 bytes aligned!; -#pragma data_alignment=4 -#else -static uint8_t JpegBuffer[2][MAX_JPEG_SIZE]__attribute((section("NC_BSS"),aligned(8))); //8 bytes aligned!; -#endif - static void IntCallbackFunc_Vsync(DisplayBase::int_type_t int_type) { /* Interrupt callback function for Vsync interruption */ if (vsync_count > 0) {