大家工作中都会用到截图工具,QQ和微信自带截图工具,但截图完毕要粘贴,不能直接保存。并且每次要你登录软件才能用。
windows10也自带了截图工具:win +shift + s,虽然这种截图可以保存,但是无法做标注。
今天推荐一款截图神器,包含以上所有优点,还有更多新功能,同事们都在用:snipaste
官网:
https://www.snipaste.com/
直接在左边下载 windows desktop 版本。下载后免安装,直接解压就可以用。
截图快捷键为 F1 ,贴图快捷键为 F3。效果如下:
当然了,图中说的功能完整框架如下,博主最近在研究 Linux 电源管理子系统,配合过去研究的中断子系统,可以很好理解中断是如何唤醒系统的。
中断唤醒系统这个功能很常见,手机的电源键每次按下都会让手机睡眠或者让手机唤醒。
static irqreturn_t smcdef_event_handler(int irq, void *private)
{
/* do something you want, like report input events through input subsystem */
return IRQ_HANDLED;
}
static int smcdef_suspend(struct device *dev)
{
enable_irq_wake(irq);
}
static int smcdef_resume(struct device *dev)
{
disable_irq_wake(irq);
}
static int smcdef_probe(struct i2c_client *client,
const struct i2c_device_id *id)
{
/* ... */
request_thread_irq(irq,
smcdef_event_handler,
NULL,
IRQF_TRIGGER_FALLING,
"smcdef",
pdata);
return 0;
}
static int smcdef_remove(struct i2c_client *client)
{
return 0;
}
static const struct of_device_id smcdef_dt_ids[] = {
{.compatible = "wowo,smcdef" },
{ }
};
MODULE_DEVICE_TABLE(of, smcdef_dt_ids);
static SIMPLE_DEV_PM_OPS(smcdef_pm_ops, smcdef_suspend, smcdef_resume);//注册
static struct i2c_driver smcdef_driver = {
.driver = {
.name = "smcdef",
.of_match_table = of_match_ptr(smcdef_dt_ids),
.pm = &smcdef_pm_ops,
},
.probe = smcdef_probe,
.remove = smcdef_remove,
};
module_i2c_driver(smcdef_driver);
MODULE_AUTHOR("smcdef");
MODULE_DESCRIPTION("IRQ test");
MODULE_LICENSE("GPL");
这一段代码等我研究透了再给大家讲解。
本文分享自 嵌入式Linux系统开发 微信公众号,前往查看
如有侵权,请联系 cloudcommunity@tencent.com 删除。
本文参与 腾讯云自媒体同步曝光计划 ,欢迎热爱写作的你一起参与!
扫码关注腾讯云开发者
领取腾讯云代金券
Copyright © 2013 - 2025 Tencent Cloud. All Rights Reserved. 腾讯云 版权所有
深圳市腾讯计算机系统有限公司 ICP备案/许可证号:粤B2-20090059 深公网安备号 44030502008569
腾讯云计算(北京)有限责任公司 京ICP证150476号 | 京ICP备11018762号 | 京公网安备号11010802020287
Copyright © 2013 - 2025 Tencent Cloud.
All Rights Reserved. 腾讯云 版权所有