Fixing compilation issues after having added hwconfig.h and platform.c for MD380 radio

replace/d5f713a9181544e355b6f09b4a1ac99bd605c9b9
Silvano Seva 2020-10-23 08:49:50 +02:00 zatwierdzone przez Niccolò Izzo
rodzic ba40d5f70f
commit 7ff11ff5a3
3 zmienionych plików z 10 dodań i 6 usunięć

Wyświetl plik

@ -96,6 +96,7 @@ md380_src = src + ['openrtx/src/main.c',
'platform/mcu/STM32F4xx/drivers/gpio.c',
'platform/mcu/CMSIS/Device/ST/STM32F4xx/Source/system_stm32f4xx.c',
'platform/drivers/display/HX83XX_md380.c',
'platform/targets/MD380/platform.c',
'openrtx/src/graphics/graphics_rgb565.c',
'rtos/uC-OS3/Ports/ARM-Cortex-M/ARMv7-M/os_cpu_c.c',
'rtos/uC-OS3/Ports/ARM-Cortex-M/ARMv7-M/os_cpu_a.s',

Wyświetl plik

@ -19,6 +19,7 @@
#include <stm32f4xx.h>
#include "platform.h"
#include "hwconfig.h"
#include "gpio.h"
void platform_init()

Wyświetl plik

@ -23,10 +23,11 @@
#include <os.h>
#include <lib_mem.h>
#include <stdio.h>
#include "stm32f4xx.h"
#include "gpio.h"
#include "delays.h"
#include "display.h"
#include "hwconfig.h"
#include "platform.h"
static OS_TCB startTCB;
static CPU_STK_SIZE startStk[APP_CFG_TASK_START_STK_SIZE];
@ -50,7 +51,7 @@ void drawRect(int x, int y, int width, int height, uint16_t color)
{
for(int j=x; j < x_max; j++)
{
buf[j + i*display_screenWidth()] = color;
buf[j + i*SCREEN_WIDTH] = color;
}
}
}
@ -142,18 +143,19 @@ static void t2(void *arg)
OS_ERR os_err;
display_init();
display_setBacklightLevel(254);
platform_init();
platform_setBacklightLevel(254);
while(1)
{
/* Horizontal red line */
drawRect(0, 10, display_screenWidth(), 20, 0xF800);
drawRect(0, 10, SCREEN_WIDTH, 20, 0xF800);
/* Vertical blue line */
drawRect(10, 0, 20, display_screenHeight(), 0x001F);
drawRect(10, 0, 20, SCREEN_HEIGHT, 0x001F);
/* Vertical green line */
drawRect(80, 0, 20, display_screenHeight(), 0x07e0);
drawRect(80, 0, 20, SCREEN_HEIGHT, 0x07e0);
display_render();