迪文科技论坛

 找回密码
 立即注册
搜索
查看: 319|回复: 3

[Question]#define VP value

[复制链接]

7

主题

21

回帖

118

积分

注册会员

Rank: 2

积分
118
发表于 2022-5-5 15:38:06 | 显示全部楼层 |阅读模式
Hi
It is in code programming practice in order to   sys_read_VP or sys_write_VP  to use #define directive.
so , we put in a file, no matter if .c or .h ( is preferrable a dedicated name file) #define directive

Let us suppose we have a Animated Icons display variable and a Text display variable.
The natural directive which bind VP to a name is

#define TEXT_TO_DISPLAY           0x1000   
#define ANIMATED_ICONS_VP      0x1010

When code is executed , in instruction
                         sys_read_VP(TEXT_TO_DISPLAY, ...);
the substitution happened and the read action take place.

On the other side , if examine the memory map  , in 14.bin file the VP value as was defined (offset  0x4 from base address 0x4000)  point to an address in 22.bin (multiplyed  by 2) where data resides.
In my intention is  to read in a table the content of 14.bin which has start address at 0x4000 for keep a table with display variable dataand access them from coresponded address.
How can be this achieved (through program).How flash 14.bin address can be identified( is a multiple of 128 KByte - the 11 th position 128 x 11 = 000f:ffff ?)
回复

使用道具 举报

15

主题

115

回帖

1910

积分

金牌会员

Rank: 6Rank: 6

积分
1910
发表于 2022-5-5 16:06:37 | 显示全部楼层
回复

使用道具 举报

7

主题

21

回帖

118

积分

注册会员

Rank: 2

积分
118
 楼主| 发表于 2022-5-5 18:05:43 | 显示全部楼层
本帖最后由 negut 于 2022-5-5 19:01 编辑

Ok.thanks, but is not that what i asked for.
Let me put with simpler terms.

How can read 14.bin flash address ?Is 14.bin load address flash 0f:ffff ?
Since what i 've seen TouchHandle is reffering 0xF00 as initial address for 13.bin.Is  that OK ?
If so , the other addresses could be inferred from this.
回复

使用道具 举报

15

主题

115

回帖

1910

积分

金牌会员

Rank: 6Rank: 6

积分
1910
发表于 2022-5-11 15:01:33 | 显示全部楼层
negut 发表于 2022-5-5 18:05
Ok.thanks, but is not that what i asked for.
Let me put with simpler terms.

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

x
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|小黑屋|迪文科技论坛 ( 京ICP备05033781号-1 )

GMT+8, 2025-5-10 04:06 , Processed in 0.038668 second(s), 22 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表