当前位置: 首页 > news >正文

离石市网站建设公司网站推广优化排名公司

离石市网站建设公司,网站推广优化排名公司,政府网站开发招标文件,云平台开发pico高级API函数中, multicore_fifo_pop_timeout_us 和 multicore_fifo_push_timeout_us 的延时参数, 如修改为500微秒以上时,其延时似乎远远超过设定值,其反馈速度似乎被主核的交互所左右 ,而修改为200以下时&#x…

pico高级API函数中,
multicore_fifo_pop_timeout_us 和  multicore_fifo_push_timeout_us 的延时参数,
如修改为500微秒以上时,其延时似乎远远超过设定值,其反馈速度似乎被主核的交互所左右 ,而修改为200以下时,反馈出现阶越:运行这两个函数 的core1的打印速度快速增加,显示其延时更加与设定值相符。

测试的代码:

#include <stdio.h>
#include "pico/stdlib.h"#include "pico/multicore.h"
#define FLAG_VALUE 2void core1_entry() {uint32_t g=0;
bool ifthereisp=false;
uint64_t timeout_u=500;   //这儿修改为500微秒以上时,core1的打印速度和core0 1hz基本同步 ,而修改为200以下时,反馈出现阶越:core1的打印速度快速增加。
uint32_t out;lable2:multicore_fifo_push_timeout_us ( FLAG_VALUE,timeout_u) ;if( !multicore_fifo_pop_timeout_us (timeout_u,&out) )printf("Hmm, that's not right on core 1!\n");elseprintf("Its all gone well on core 1! %u  \n",out);
goto lable2;while (1)tight_loop_contents();
}int main() {stdio_init_all();sleep_ms(1000);
printf("Hello, fakeone\n");sleep_ms(1000);multicore_launch_core1(core1_entry);uint32_t g=0;// Wait for it to start up
lable:g = multicore_fifo_pop_blocking();if (g != FLAG_VALUE)printf("Hmm, that's not right on core 0!\n");else {multicore_fifo_push_blocking(FLAG_VALUE);printf("It's all gone well on core 0!\n");}
sleep_ms(1000);
goto lable;while (true) {printf("Hello, world!\n");sleep_ms(1000);}return 0;
}

关键函数介绍官方原文:

bool multicore_fifo_pop_timeout_us     (     uint64_t      timeout_us,
        uint32_t *      out
    )         

Pop data from the read FIFO (data from the other core) with timeout.

This function will block until there is data ready to be read or the timeout is reached

See the note in the fifo section for considerations regarding use of the inter-core FIFOs
Parameters

timeout_us     the timeout in microseconds
out     the location to store the popped data if available
Returns

true if the data was popped and a value copied into out, false if the timeout occurred before data could be popped


bool multicore_fifo_push_timeout_us     (     uint32_t      data,
        uint64_t      timeout_us
    )         

Push data on to the write FIFO (data to the other core) with timeout.

This function will block until there is space for the data to be sent or the timeout is reached
Parameters

data     A 32 bit value to push on to the FIFO
timeout_us     the timeout in microseconds
Returns

true if the data was pushed, false if the timeout occurred before data could be pushed

附pico例程原代码:


#include <stdio.h>
#include "pico/stdlib.h"
#include "pico/multicore.h"#define FLAG_VALUE 123void core1_entry() {multicore_fifo_push_blocking(FLAG_VALUE);uint32_t g = multicore_fifo_pop_blocking();if (g != FLAG_VALUE)printf("Hmm, that's not right on core 1!\n");elseprintf("Its all gone well on core 1!");while (1)tight_loop_contents();
}int main() {stdio_init_all();printf("Hello, multicore!\n");multicore_launch_core1(core1_entry);// Wait for it to start upuint32_t g = multicore_fifo_pop_blocking();if (g != FLAG_VALUE)printf("Hmm, that's not right on core 0!\n");else {multicore_fifo_push_blocking(FLAG_VALUE);printf("It's all gone well on core 0!");}}

http://www.shuangfujiaoyu.com/news/17325.html

相关文章:

  • 如何做网站旅游产品分析推广用哪个平台效果好
  • 免费的网站免安装微信运营方案
  • 怎么做宣传网站深圳网络营销推广培训
  • 网站开发用盗版犯法google浏览器下载
  • 廊坊怎么做网站it培训机构哪家好
  • wordlink网站开发济南seo公司报价
  • 湛江门户网站如何做电商 个人
  • 怎么直接做免费网站三亚百度推广开户
  • 网站建设课设总结优化网站内容
  • 网站建设活动策划微博推广怎么做
  • 一个空间两个网站对seoapp推广公司
  • 做网站的模版东莞疫情最新消息今天中高风险区
  • 不通过网站可以做360全景吗网站推广平台搭建
  • 正规货源网站大全营销方案ppt
  • 京东联盟的网站怎么做的全球新闻最新消息
  • 搞网站建设赚钱不百度新闻官网
  • 个人动漫网站怎么做页面手机关键词seo排名优化
  • wordpress文章中添加视频seo服务 文库
  • 网站设计与建设word设计理念热搜榜排名今日
  • 凡客服装有限公司桂平seo关键词优化
  • localhost怎么做网站爱营销电信版下载app最新版
  • 国家电网 两学一做 网站太原网站建设优化
  • 免费咨询医生妇科医生搜索关键词优化
  • 个人网站的投稿平台广州seo
  • 深圳宝安做网站的公司网站按天扣费优化推广
  • 网站开发团队需配备什么岗位百度金融
  • ps做网站的视频seo优化与sem推广有什么关系
  • 做采集网站赚钱济南百度推广优化
  • 做仿牌网站被封有哪些免费网站可以发布广告
  • 收费视频网站怎么做百度搜题网页版入口