信息修改,通讯,显示相关
This commit is contained in:
1 parent
c9633041ab
commit
ac7e06bbd2
15 files changed
+89
-47
No files matched your search
@@ -5,7 +5,7 @@
|
|||||||
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
|
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
|
||||||
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
|
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
|
||||||
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
|
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
|
||||||
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" env-hash="-1130869187985072700" id="ilg.gnuarmeclipse.managedbuild.cross.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT ARM Cross GCC Built-in Compiler Settings " parameter="${COMMAND} ${FLAGS} ${cross_toolchain_flags} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true">
|
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" env-hash="1355587618174935003" id="ilg.gnuarmeclipse.managedbuild.cross.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT ARM Cross GCC Built-in Compiler Settings " parameter="${COMMAND} ${FLAGS} ${cross_toolchain_flags} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true">
|
||||||
<language-scope id="org.eclipse.cdt.core.gcc"/>
|
<language-scope id="org.eclipse.cdt.core.gcc"/>
|
||||||
<language-scope id="org.eclipse.cdt.core.g++"/>
|
<language-scope id="org.eclipse.cdt.core.g++"/>
|
||||||
</provider>
|
</provider>
|
||||||
|
|||||||
+15
-1
@@ -38,6 +38,7 @@ static void mb_plc_read_regs(mb_inst_t *hinst)
|
|||||||
{
|
{
|
||||||
if (mb_connect(hinst) < 0)//连接失败, 延时返回
|
if (mb_connect(hinst) < 0)//连接失败, 延时返回
|
||||||
{
|
{
|
||||||
|
PLCLINK_OK = 0;
|
||||||
LOG_E("modbus connect fail.");
|
LOG_E("modbus connect fail.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -47,12 +48,15 @@ static void mb_plc_read_regs(mb_inst_t *hinst)
|
|||||||
//读取 Modbus bits
|
//读取 Modbus bits
|
||||||
int mrx = mb_read_bits(hinst, 2000, DI_TABLE_SIZE, r_buffer);
|
int mrx = mb_read_bits(hinst, 2000, DI_TABLE_SIZE, r_buffer);
|
||||||
if (mrx > 0)
|
if (mrx > 0)
|
||||||
{ //解包到数据表
|
{
|
||||||
|
PLCLINK_OK = 1;
|
||||||
|
//解包到数据表
|
||||||
for (int i = 0; i < DI_TABLE_SIZE; i++) {
|
for (int i = 0; i < DI_TABLE_SIZE; i++) {
|
||||||
di_table[i].current_state = (r_buffer[i / 8] >> (i % 8)) & 1;
|
di_table[i].current_state = (r_buffer[i / 8] >> (i % 8)) & 1;
|
||||||
}
|
}
|
||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
|
PLCLINK_OK = 0;
|
||||||
rt_thread_mdelay(500);
|
rt_thread_mdelay(500);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -73,8 +77,12 @@ static void mb_plc_read_regs(mb_inst_t *hinst)
|
|||||||
int mwy = mb_write_bits(hinst, 2256, DO_TABLE_SIZE, w_buffer);
|
int mwy = mb_write_bits(hinst, 2256, DO_TABLE_SIZE, w_buffer);
|
||||||
if (mwy ==0)
|
if (mwy ==0)
|
||||||
{
|
{
|
||||||
|
PLCLINK_OK = 0;
|
||||||
rt_thread_mdelay(500);
|
rt_thread_mdelay(500);
|
||||||
}
|
}
|
||||||
|
else{
|
||||||
|
PLCLINK_OK = 1;
|
||||||
|
}
|
||||||
|
|
||||||
//输入寄存器d0->6000
|
//输入寄存器d0->6000
|
||||||
//u16 r_regsD[AI_TABLE_SIZE];
|
//u16 r_regsD[AI_TABLE_SIZE];
|
||||||
@@ -82,11 +90,13 @@ static void mb_plc_read_regs(mb_inst_t *hinst)
|
|||||||
int mrd = mb_read_regs(hinst, 6000, AI_TABLE_SIZE, r_regsD);
|
int mrd = mb_read_regs(hinst, 6000, AI_TABLE_SIZE, r_regsD);
|
||||||
if (mrd > 0)
|
if (mrd > 0)
|
||||||
{
|
{
|
||||||
|
PLCLINK_OK = 1;
|
||||||
for (int i = 0; i < AI_TABLE_SIZE; i++)
|
for (int i = 0; i < AI_TABLE_SIZE; i++)
|
||||||
{
|
{
|
||||||
ai_table[i].current_Value = r_regsD[i];
|
ai_table[i].current_Value = r_regsD[i];
|
||||||
}
|
}
|
||||||
}else {
|
}else {
|
||||||
|
PLCLINK_OK = 0;
|
||||||
rt_thread_mdelay(500);
|
rt_thread_mdelay(500);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -100,8 +110,12 @@ static void mb_plc_read_regs(mb_inst_t *hinst)
|
|||||||
int mwd = mb_write_regs(hinst, 6100, AO_TABLE_SIZE, w_regsD);
|
int mwd = mb_write_regs(hinst, 6100, AO_TABLE_SIZE, w_regsD);
|
||||||
if (mwd == 0)
|
if (mwd == 0)
|
||||||
{
|
{
|
||||||
|
PLCLINK_OK = 0;
|
||||||
rt_thread_mdelay(500);
|
rt_thread_mdelay(500);
|
||||||
}
|
}
|
||||||
|
else{
|
||||||
|
PLCLINK_OK = 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
extern struct rt_memheap sram_DTCMRAM,sdram_heap;
|
extern struct rt_memheap sram_DTCMRAM,sdram_heap;
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
#include <rtdevice.h>
|
#include <rtdevice.h>
|
||||||
#include "data_comm.h"
|
#include "data_comm.h"
|
||||||
#include <rs485.h>
|
#include <rs485.h>
|
||||||
|
#include "SC828_DATA_table.h"
|
||||||
|
|
||||||
#define DBG_TAG "SCCM_link"
|
#define DBG_TAG "SCCM_link"
|
||||||
#define DBG_LVL DBG_LOG
|
#define DBG_LVL DBG_LOG
|
||||||
@@ -58,6 +59,7 @@ void uart_thread_entry(void *parameter)
|
|||||||
|
|
||||||
if (len > 0)
|
if (len > 0)
|
||||||
{
|
{
|
||||||
|
SCLINK_OK=1;
|
||||||
// 动态分配请求结构体(见之前完整代码)
|
// 动态分配请求结构体(见之前完整代码)
|
||||||
struct proc_request *req = rt_malloc(sizeof(struct proc_request));
|
struct proc_request *req = rt_malloc(sizeof(struct proc_request));
|
||||||
if (!req) continue;
|
if (!req) continue;
|
||||||
@@ -68,7 +70,7 @@ void uart_thread_entry(void *parameter)
|
|||||||
if (rt_mq_send(request_mq, &req, sizeof(req)) == RT_EOK)
|
if (rt_mq_send(request_mq, &req, sizeof(req)) == RT_EOK)
|
||||||
{
|
{
|
||||||
// 等待处理完成
|
// 等待处理完成
|
||||||
if (rt_mq_recv(response_mq, &req, sizeof(req), 500) >= RT_EOK)
|
if (rt_mq_recv(response_mq, &req, sizeof(req), 1000) >= RT_EOK)
|
||||||
{
|
{
|
||||||
if(req->output_len>0) rs485_send(hinst, req->output, req->output_len);
|
if(req->output_len>0) rs485_send(hinst, req->output, req->output_len);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -210,6 +210,8 @@ const unsigned char DO_TABLE_SIZE = sizeof(do_table) / sizeof(do_table[0]);
|
|||||||
const unsigned char AI_TABLE_SIZE = sizeof(ai_table) / sizeof(ai_table[0]);
|
const unsigned char AI_TABLE_SIZE = sizeof(ai_table) / sizeof(ai_table[0]);
|
||||||
const unsigned char AO_TABLE_SIZE = sizeof(ao_table) / sizeof(ao_table[0]);
|
const unsigned char AO_TABLE_SIZE = sizeof(ao_table) / sizeof(ao_table[0]);
|
||||||
const unsigned char DATA_TABLE_SIZE = sizeof(data_table) / sizeof(data_table[0]);
|
const unsigned char DATA_TABLE_SIZE = sizeof(data_table) / sizeof(data_table[0]);
|
||||||
|
int8_t PLCLINK_OK = 0;
|
||||||
|
int8_t SCLINK_OK = 0;
|
||||||
|
|
||||||
//步骤数据表最大
|
//步骤数据表最大
|
||||||
//IO_STEP_DATA step_table[256] ;
|
//IO_STEP_DATA step_table[256] ;
|
||||||
@@ -399,11 +401,11 @@ void table_thread_entry(void *parameter)
|
|||||||
rt_thread_delay(500);
|
rt_thread_delay(500);
|
||||||
|
|
||||||
//Ai输入
|
//Ai输入
|
||||||
MTT = get_ai_value(4001)/10.0f;
|
MTT = get_ai_value(4001);///浮点
|
||||||
MUT = get_ai_value(4002)/10.0f;
|
MUT = get_ai_value(4002);///浮点
|
||||||
STTA = get_ai_value(4003)/10.0f;
|
STTA = get_ai_value(4003);///浮点
|
||||||
STTB = get_ai_value(4004)/10.0f;
|
STTB = get_ai_value(4004);///浮点
|
||||||
STTC = get_ai_value(4005)/10.0f;
|
STTC = get_ai_value(4005);///浮点
|
||||||
MTL = get_ai_value(4007);
|
MTL = get_ai_value(4007);
|
||||||
STLA = get_ai_value(4008);
|
STLA = get_ai_value(4008);
|
||||||
STLB = get_ai_value(4009);
|
STLB = get_ai_value(4009);
|
||||||
|
|||||||
@@ -70,6 +70,9 @@ extern IO_State_DATA data_table[];
|
|||||||
//extern IO_STEP_DATA step_table[256];
|
//extern IO_STEP_DATA step_table[256];
|
||||||
extern IO_STEP_DATA *step_table;
|
extern IO_STEP_DATA *step_table;
|
||||||
|
|
||||||
|
extern int8_t PLCLINK_OK;//plc连接状态
|
||||||
|
extern int8_t SCLINK_OK;//中控连接
|
||||||
|
|
||||||
extern const unsigned char DI_TABLE_SIZE;
|
extern const unsigned char DI_TABLE_SIZE;
|
||||||
extern const unsigned char DO_TABLE_SIZE;
|
extern const unsigned char DO_TABLE_SIZE;
|
||||||
extern const unsigned char AI_TABLE_SIZE;
|
extern const unsigned char AI_TABLE_SIZE;
|
||||||
|
|||||||
@@ -41,18 +41,18 @@ unsigned int UserInfoStart = 900;
|
|||||||
unsigned int RUN = 0;
|
unsigned int RUN = 0;
|
||||||
unsigned int STEPID = 0;
|
unsigned int STEPID = 0;
|
||||||
|
|
||||||
// 浮点变量
|
// 需要小数点变量
|
||||||
float MTT = 0.0f;//主缸温度
|
unsigned int MTT = 0;//主缸温度
|
||||||
float MTL = 0.0f;//主缸水位
|
unsigned int MTL = 0;//主缸水位
|
||||||
float MTH = 6.0f;//主缸ph
|
unsigned int MTH = 6;//主缸ph
|
||||||
float MST = 0.0f;//目标温度
|
unsigned int MST = 0;//目标温度
|
||||||
float MUT = 0.0f;//主缸温度2
|
unsigned int MUT = 0;//主缸温度2
|
||||||
float STTA = 0.0f;//料a温度
|
unsigned int STTA = 0;//料a温度
|
||||||
float STLA = 0.0f;//料a水位
|
unsigned int STLA = 0;//料a水位
|
||||||
float STTB = 0.0f;//料b温度
|
unsigned int STTB = 0;//料b温度
|
||||||
float STLB = 0.0f;//料b水位
|
unsigned int STLB = 0;//料b水位
|
||||||
float STTC = 0.0f;//料c温度
|
unsigned int STTC = 0;//料c温度
|
||||||
float STLC = 0.0f;//料c水位
|
unsigned int STLC = 0;//料c水位
|
||||||
|
|
||||||
// 控制输出
|
// 控制输出
|
||||||
unsigned int Pump = 0;//主泵
|
unsigned int Pump = 0;//主泵
|
||||||
|
|||||||
@@ -64,17 +64,17 @@ extern unsigned int P9;
|
|||||||
extern unsigned int P10;
|
extern unsigned int P10;
|
||||||
|
|
||||||
// ===== 浮点数变量 =====
|
// ===== 浮点数变量 =====
|
||||||
extern float MTT;
|
extern unsigned int MTT;
|
||||||
extern float MTL;
|
extern unsigned int MTL;
|
||||||
extern float MTH;
|
extern unsigned int MTH;
|
||||||
extern float MST;
|
extern unsigned int MST;
|
||||||
extern float MUT;
|
extern unsigned int MUT;
|
||||||
extern float STTA;
|
extern unsigned int STTA;
|
||||||
extern float STLA;
|
extern unsigned int STLA;
|
||||||
extern float STTB;
|
extern unsigned int STTB;
|
||||||
extern float STLB;
|
extern unsigned int STLB;
|
||||||
extern float STTC;
|
extern unsigned int STTC;
|
||||||
extern float STLC;
|
extern unsigned int STLC;
|
||||||
extern unsigned int P1;
|
extern unsigned int P1;
|
||||||
extern unsigned int P2;
|
extern unsigned int P2;
|
||||||
extern unsigned int P3;
|
extern unsigned int P3;
|
||||||
|
|||||||
@@ -21,6 +21,7 @@
|
|||||||
#include <guider/generated/widgets_init.h>
|
#include <guider/generated/widgets_init.h>
|
||||||
#include "lvgl.h"
|
#include "lvgl.h"
|
||||||
#include <ui_data_labels.h>
|
#include <ui_data_labels.h>
|
||||||
|
#include "SC828_DATA_table.h"
|
||||||
|
|
||||||
#define DBG_TAG "gui"
|
#define DBG_TAG "gui"
|
||||||
#define DBG_LVL DBG_LOG
|
#define DBG_LVL DBG_LOG
|
||||||
@@ -56,13 +57,26 @@ void setup_s_screen(lv_ui *ui)
|
|||||||
//工单
|
//工单
|
||||||
lv_label_set_text(ui->screen_order, (const char *)Work);
|
lv_label_set_text(ui->screen_order, (const char *)Work);
|
||||||
//水位
|
//水位
|
||||||
snprintf(wter_str, sizeof(wter_str), "%04.0f", MTL);
|
snprintf(wter_str, sizeof(wter_str), "%04.0f", MTL/10.0f);
|
||||||
lv_label_set_text(ui->screen_water, (const char *)wter_str);
|
lv_label_set_text(ui->screen_water, (const char *)wter_str);
|
||||||
//温度
|
//温度
|
||||||
snprintf(temp_str, sizeof(temp_str), "%05.1f", MTT);
|
snprintf(temp_str, sizeof(temp_str), "%05.1f", MTT/10.0f);
|
||||||
lv_label_set_text(ui->screen_temp, (const char *)temp_str);
|
lv_label_set_text(ui->screen_temp, (const char *)temp_str);
|
||||||
|
|
||||||
|
if(SCLINK_OK)//中央连接状态显示
|
||||||
|
{
|
||||||
|
lv_obj_clear_flag(ui->screen_inf_link, LV_OBJ_FLAG_HIDDEN);
|
||||||
|
SCLINK_OK =0;
|
||||||
|
}else{
|
||||||
|
lv_obj_add_flag(ui->screen_inf_link, LV_OBJ_FLAG_HIDDEN);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(PLCLINK_OK)//plc连接状态显示
|
||||||
|
{
|
||||||
|
|
||||||
|
}else{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
update_led_i();
|
update_led_i();
|
||||||
update_led_o();
|
update_led_o();
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ static lv_color_t *buf_3_2 = RT_NULL;
|
|||||||
/**********************
|
/**********************
|
||||||
* GLOBAL FUNCTIONS
|
* GLOBAL FUNCTIONS
|
||||||
**********************/
|
**********************/
|
||||||
extern struct rt_memheap sdram_heap; //
|
extern struct rt_memheap sdram_lcd; //
|
||||||
void lv_port_disp_init(void)
|
void lv_port_disp_init(void)
|
||||||
{
|
{
|
||||||
/*-------------------------
|
/*-------------------------
|
||||||
@@ -128,21 +128,21 @@ void lv_port_disp_init(void)
|
|||||||
|
|
||||||
|
|
||||||
// 使用对齐分配函数
|
// 使用对齐分配函数
|
||||||
buf_1 = (lv_color_t *)rt_memheap_alloc_align(&sdram_heap,
|
buf_1 = (lv_color_t *)rt_memheap_alloc_align(&sdram_lcd,
|
||||||
sizeof(lv_color_t) * MY_DISP_HOR_RES * 10,
|
sizeof(lv_color_t) * MY_DISP_HOR_RES * 10,
|
||||||
4); // ← 关键:对齐到 4 字节
|
4); // ← 关键:对齐到 4 字节
|
||||||
|
|
||||||
buf_2_1 = (lv_color_t *)rt_memheap_alloc_align(&sdram_heap,
|
buf_2_1 = (lv_color_t *)rt_memheap_alloc_align(&sdram_lcd,
|
||||||
sizeof(lv_color_t) * MY_DISP_HOR_RES * 10,
|
sizeof(lv_color_t) * MY_DISP_HOR_RES * 10,
|
||||||
4);
|
4);
|
||||||
buf_2_2 = (lv_color_t *)rt_memheap_alloc_align(&sdram_heap,
|
buf_2_2 = (lv_color_t *)rt_memheap_alloc_align(&sdram_lcd,
|
||||||
sizeof(lv_color_t) * MY_DISP_HOR_RES * 10,
|
sizeof(lv_color_t) * MY_DISP_HOR_RES * 10,
|
||||||
4);
|
4);
|
||||||
|
|
||||||
buf_3_1 = (lv_color_t *)rt_memheap_alloc_align(&sdram_heap,
|
buf_3_1 = (lv_color_t *)rt_memheap_alloc_align(&sdram_lcd,
|
||||||
sizeof(lv_color_t) * MY_DISP_HOR_RES * MY_DISP_VER_RES,
|
sizeof(lv_color_t) * MY_DISP_HOR_RES * MY_DISP_VER_RES,
|
||||||
4);
|
4);
|
||||||
buf_3_2 = (lv_color_t *)rt_memheap_alloc_align(&sdram_heap,
|
buf_3_2 = (lv_color_t *)rt_memheap_alloc_align(&sdram_lcd,
|
||||||
sizeof(lv_color_t) * MY_DISP_HOR_RES * MY_DISP_VER_RES,
|
sizeof(lv_color_t) * MY_DISP_HOR_RES * MY_DISP_VER_RES,
|
||||||
4);
|
4);
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
#include <guider/generated/widgets_init.h>
|
#include <guider/generated/widgets_init.h>
|
||||||
#include "lvgl.h"
|
#include "lvgl.h"
|
||||||
#include <ui_data_labels.h>
|
#include <ui_data_labels.h>
|
||||||
#include "libcsv.h"
|
//#include "libcsv.h"
|
||||||
|
|
||||||
// 全局或静态数组
|
// 全局或静态数组
|
||||||
char buf[8];
|
char buf[8];
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
static SDRAM_HandleTypeDef hsdram1;
|
static SDRAM_HandleTypeDef hsdram1;
|
||||||
static FMC_SDRAM_CommandTypeDef command;
|
static FMC_SDRAM_CommandTypeDef command;
|
||||||
#ifdef RT_USING_MEMHEAP_AS_HEAP
|
#ifdef RT_USING_MEMHEAP_AS_HEAP
|
||||||
struct rt_memheap sdram_heap;
|
struct rt_memheap sdram_heap,sdram_lcd;
|
||||||
#endif
|
#endif
|
||||||
/**
|
/**
|
||||||
* @brief Perform the SDRAM exernal memory inialization sequence
|
* @brief Perform the SDRAM exernal memory inialization sequence
|
||||||
@@ -161,6 +161,7 @@ static int SDRAM_Init(void)
|
|||||||
#ifdef RT_USING_MEMHEAP_AS_HEAP
|
#ifdef RT_USING_MEMHEAP_AS_HEAP
|
||||||
/* If RT_USING_MEMHEAP_AS_HEAP is enabled, SDRAM is initialized to the heap */
|
/* If RT_USING_MEMHEAP_AS_HEAP is enabled, SDRAM is initialized to the heap */
|
||||||
rt_memheap_init(&sdram_heap, "SDRAM", (void *)SDRAM1_START, SDRAM1_SIZE);
|
rt_memheap_init(&sdram_heap, "SDRAM", (void *)SDRAM1_START, SDRAM1_SIZE);
|
||||||
|
rt_memheap_init(&sdram_lcd, "LCDRAM", (void *)SDRAM_LCD_START, SDRAM_LCD_SIZE);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
#include "DB_SQLite.h"
|
#include "DB_SQLite.h"
|
||||||
#include "sqlite3.h"
|
#include "sqlite3.h"
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include "libcsv.h"
|
//#include "libcsv.h"
|
||||||
|
|
||||||
#define DB_NAME "/sddisk/SC828.db"
|
#define DB_NAME "/sddisk/SC828.db"
|
||||||
int db_HelperInit;
|
int db_HelperInit;
|
||||||
|
|||||||
+2
-2
@@ -30,8 +30,8 @@ rt_weak void rt_hw_board_init()
|
|||||||
|
|
||||||
rt_memheap_init(&sram_DTCMRAM, "DTCMRAM", (void *)DTCMRAM_START, DTCMRAM_SIZE);
|
rt_memheap_init(&sram_DTCMRAM, "DTCMRAM", (void *)DTCMRAM_START, DTCMRAM_SIZE);
|
||||||
//rt_memheap_init(&sram_AXIRAM, "AXIRAM", (void *)AXIRAM_START, AXIRAM_SIZE);
|
//rt_memheap_init(&sram_AXIRAM, "AXIRAM", (void *)AXIRAM_START, AXIRAM_SIZE);
|
||||||
rt_memheap_init(&sram_SRAM1, "SRAM1", (void *)SRAM1_START, SRAM1_SIZE);
|
//rt_memheap_init(&sram_SRAM1, "SRAM1", (void *)SRAM1_START, SRAM1_SIZE);
|
||||||
rt_memheap_init(&sram_SRAM2, "SRAM2", (void *)SRAM2_START, SRAM2_SIZE);
|
//rt_memheap_init(&sram_SRAM2, "SRAM2", (void *)SRAM2_START, SRAM2_SIZE);
|
||||||
|
|
||||||
hw_board_init(BSP_CLOCK_SOURCE, BSP_CLOCK_SOURCE_FREQ_MHZ, BSP_CLOCK_SYSTEM_FREQ_MHZ);
|
hw_board_init(BSP_CLOCK_SOURCE, BSP_CLOCK_SOURCE_FREQ_MHZ, BSP_CLOCK_SYSTEM_FREQ_MHZ);
|
||||||
|
|
||||||
|
|||||||
+8
-2
@@ -58,8 +58,14 @@ extern "C"
|
|||||||
//#define SRAM3_END (SRAM3_START + SRAM3_SIZE)
|
//#define SRAM3_END (SRAM3_START + SRAM3_SIZE)
|
||||||
|
|
||||||
#define BSP_USING_SDRAM
|
#define BSP_USING_SDRAM
|
||||||
#define SDRAM1_START (0xC0000000)
|
//Mib显存
|
||||||
#define SDRAM1_SIZE (32*1024*1024)
|
#define LCD_SIZE (5)
|
||||||
|
#define SDRAM_LCD_START (0xC0000000)
|
||||||
|
#define SDRAM_LCD_SIZE (LCD_SIZE*1024*1024)
|
||||||
|
#define SDRAM_LCD_END (SDRAM_LCD_START + SDRAM_LCD_SIZE)
|
||||||
|
|
||||||
|
#define SDRAM1_START (SDRAM_LCD_END)//(0xC0400000)
|
||||||
|
#define SDRAM1_SIZE ((32-LCD_SIZE)*1024*1024)
|
||||||
#define SDRAM1_END (SDRAM1_START + SDRAM1_SIZE)
|
#define SDRAM1_END (SDRAM1_START + SDRAM1_SIZE)
|
||||||
|
|
||||||
/*-------------------------- ROM/RAM CONFIG END --------------------------*/
|
/*-------------------------- ROM/RAM CONFIG END --------------------------*/
|
||||||
|
|||||||
+1
-1
@@ -458,7 +458,7 @@ int ltdc_init(void)
|
|||||||
lcdltdc.pwidth = 1024; lcdltdc.pheight = 600;
|
lcdltdc.pwidth = 1024; lcdltdc.pheight = 600;
|
||||||
lcdltdc.hsw = 20; lcdltdc.hbp = 160; lcdltdc.hfp = 160;
|
lcdltdc.hsw = 20; lcdltdc.hbp = 160; lcdltdc.hfp = 160;
|
||||||
lcdltdc.vsw = 3; lcdltdc.vbp = 23; lcdltdc.vfp = 12;
|
lcdltdc.vsw = 3; lcdltdc.vbp = 23; lcdltdc.vfp = 12;
|
||||||
ltdc_clk_set(128, 32, 7);
|
ltdc_clk_set(128, 32, 9);
|
||||||
}
|
}
|
||||||
else if (lcdid == 0X7018)
|
else if (lcdid == 0X7018)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in new issue
Block a user