6
6
#include " config.h"
7
7
#include " AVI_parser.h"
8
8
#include " image.h"
9
+ #include " SDRAM.h"
9
10
10
11
struct edid recognized_edid;
11
12
@@ -60,45 +61,47 @@ void setup() {
60
61
// anx7625_dp_start(0, &recognized_edid, EDID_MODE_1280x720_60Hz);
61
62
anx7625_dp_start (0 , &recognized_edid);
62
63
64
+ SDRAM.begin (getFramebufferEnd ());
65
+
63
66
delay (1000 );
64
67
65
- /*
66
- QSPIFBlockDevice* block_device = new QSPIFBlockDevice(PD_11, PD_12, PF_7, PD_13,
67
- PF_10, PG_6, QSPIF_POLARITY_MODE_0, MBED_CONF_QSPIF_QSPI_FREQ);
68
- block_device->init();
68
+ /*
69
+ QSPIFBlockDevice* block_device = new QSPIFBlockDevice(PD_11, PD_12, PF_7, PD_13,
70
+ PF_10, PG_6, QSPIF_POLARITY_MODE_0, MBED_CONF_QSPIF_QSPI_FREQ);
71
+ block_device->init();
69
72
70
- mbed::bd_size_t sector_size_at_address_0 = block_device->get_erase_size(0);
73
+ mbed::bd_size_t sector_size_at_address_0 = block_device->get_erase_size(0);
71
74
72
- printf("QSPIF BD size: %llu\n", block_device->size());
73
- printf("QSPIF BD read size: %llu\n", block_device->get_read_size());
74
- printf("QSPIF BD program size: %llu\n", block_device->get_program_size());
75
+ printf("QSPIF BD size: %llu\n", block_device->size());
76
+ printf("QSPIF BD read size: %llu\n", block_device->get_read_size());
77
+ printf("QSPIF BD program size: %llu\n", block_device->get_program_size());
75
78
76
- printf("QSPIF BD erase size (at address 0): %llu\n", sector_size_at_address_0);
79
+ printf("QSPIF BD erase size (at address 0): %llu\n", sector_size_at_address_0);
77
80
78
- char avi_header[] = {0x52, 0x49, 0x46, 0x46};
79
- char *buffer = (char *) malloc(sector_size_at_address_0);
80
- int i = 0;
81
- int res = 0;
82
- while (sector_size_at_address_0 * i < block_device->size()) {
83
- block_device->read(buffer, i, sector_size_at_address_0);
84
- res = KMP(avi_header, 4, buffer, sector_size_at_address_0);
85
- if (res != -1) {
86
- break;
81
+ char avi_header[] = {0x52, 0x49, 0x46, 0x46};
82
+ char *buffer = (char *) malloc(sector_size_at_address_0);
83
+ int i = 0;
84
+ int res = 0;
85
+ while (sector_size_at_address_0 * i < block_device->size()) {
86
+ block_device->read(buffer, i, sector_size_at_address_0);
87
+ res = KMP(avi_header, 4, buffer, sector_size_at_address_0);
88
+ if (res != -1) {
89
+ break;
90
+ }
91
+ i++;
87
92
}
88
- i++;
89
- }
90
93
91
- char *buffer = (char *) malloc(sector_size_at_address_0);
92
- block_device->read(buffer, 0, sector_size_at_address_0);
93
- */
94
+ char *buffer = (char *) malloc(sector_size_at_address_0);
95
+ block_device->read(buffer, 0, sector_size_at_address_0);
96
+ */
94
97
95
98
// AVI_FILE_ADDRESS = (((uint32_t)(ardulogo_avi)));
96
- // DumpHex((void*)buffer, 40);
99
+ // DumpHex((void*)buffer, 40);
97
100
98
- AVI_FILE_ADDRESS = ((uint32_t )(0x90000000 ));
99
- // AVI_FILE_ADDRESS = (((uint32_t)(video_envie_avi)));
101
+ // AVI_FILE_ADDRESS = ((uint32_t)(0x90000000));
102
+ AVI_FILE_ADDRESS = (((uint32_t )(video_envie_avi)));
100
103
101
- DumpHex ((void *)AVI_FILE_ADDRESS + 0x3210 , 40 );
104
+ // DumpHex((void*)AVI_FILE_ADDRESS + 0x3210, 40);
102
105
103
106
printf (" Address: %x\n " , AVI_FILE_ADDRESS);
104
107
@@ -108,9 +111,10 @@ void setup() {
108
111
LCD_X_Size = stm32_getXSize ();
109
112
LCD_Y_Size = stm32_getYSize ();
110
113
111
- // stm32_LCD_DrawImage((void*)texture_raw, (void *)getNextFrameBuffer(), 300, 300, DMA2D_INPUT_RGB565);
112
- // stm32_LCD_DrawImage((void*)texture_raw, (void *)getNextFrameBuffer(), 300, 300, DMA2D_INPUT_RGB565);
113
-
114
+ /*
115
+ stm32_LCD_DrawImage((void*)texture_raw, (void *)getNextFrameBuffer(), 300, 300, DMA2D_INPUT_RGB565);
116
+ stm32_LCD_DrawImage((void*)texture_raw, (void *)getNextFrameBuffer(), 300, 300, DMA2D_INPUT_RGB565);
117
+ */
114
118
JPEG_Handle.Instance = JPEG;
115
119
HAL_JPEG_Init (&JPEG_Handle);
116
120
}
0 commit comments