我正在用objective c++ (.mm文件)编写这个应用程序,我遇到了一些困难。我有这个循环,它每10秒运行一次,并更新一些数字,我将这些数字输出到显示器上的标签字段中。问题是,尽管循环在两次运行之间有10秒的暂停(我使用pthread和一个链接的C++文件中的睡眠函数实现了这一点),但显示不会刷新以显示这些新值。有没有办法强制它在每次循环结束时刷新/重画?
我把我的电容式液晶显示器连接到tiny6410上,并在上面安装linux。我还将friendlyarm.ini更改为:
#This line cannot be removed. by FriendlyARM(www.arm9.net)
CheckOneButton=No
Action=Install
OS= Linux
LCD-Mode = No
LCD-Type = S70
LowFormat = No
VerifyNandWrite = No
CheckCRC32=No
StatusType = Beeper| LED
#################### Linux #
我正在为Linux内核编写一个可加载的模块,其中我需要映射和取消映射内存页面。当所有中断都被禁用时,会发生这种情况。操作顺序如下所示:
preempt_disable();
disable_all_interrupts(&interrupt_mask_saved);
kmap_atomic(page); // here i map ONE page
do_some_work();
kunmap_atomic(page); // unmapping ONE page
restore_all_interrupts(interrupt_mask_saved);
preempt_enable(
我正在检查显示器是否处于休眠状态,然后在AppleScript中执行一些代码。
到目前为止我已经试过了-
set display_sleep_state to do shell script "ioreg -n IODisplayWrangler |grep -i IOPowerManagement"
if display_sleep_state contains sleeping then
-- Display is asleep
else if display_sleep_state contains awake then
-- Display is awake