• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ platformInit函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中platformInit函数的典型用法代码示例。如果您正苦于以下问题:C++ platformInit函数的具体用法?C++ platformInit怎么用?C++ platformInit使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了platformInit函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: main

int main()
{
    systemInit();
    platformInit();

    delay_ms(100);

    DEBUG_PRINT("init successfully\n");

    while(1){

        uint32_t systick = timerGetRun();

        mpu9150Get();

        // result = dmp_read_quat(quat, &more);
        // result = mpu_get_compass_reg(compass,&sensor_timestamp);

        while(timerGetRun() < systick + 49)
        {
            
        }

        sbn1HandleReceived();

    }
}
开发者ID:BHFaction,项目名称:SanBot,代码行数:27,代码来源:main.c


示例2: QObject

Overlay::Overlay() : QObject() {
	d = NULL;

	platformInit();
	forceSettings();

	qlsServer = new QLocalServer(this);
	QString pipepath;
#ifdef Q_OS_WIN
	pipepath = QLatin1String("MumbleOverlayPipe");
#else
	pipepath = QDir::home().absoluteFilePath(QLatin1String(".MumbleOverlayPipe"));
	{
		QFile f(pipepath);
		if (f.exists()) {
			qWarning() << "Overlay: Removing old socket on" << pipepath;
			f.remove();
		}
	}
#endif

	if (! qlsServer->listen(pipepath)) {
		QMessageBox::warning(NULL, QLatin1String("Mumble"), tr("Failed to create communication with overlay at %2: %1. No overlay will be available.").arg(Qt::escape(qlsServer->errorString()), Qt::escape(pipepath)), QMessageBox::Ok, QMessageBox::NoButton);
	} else {
		qWarning() << "Overlay: Listening on" << qlsServer->fullServerName();
		connect(qlsServer, SIGNAL(newConnection()), this, SLOT(newConnection()));
	}

	QMetaObject::connectSlotsByName(this);
}
开发者ID:Acidburn0zzz,项目名称:mumble,代码行数:30,代码来源:Overlay.cpp


示例3: main

int main() 
{
  //Initialize the platform.
  int err = platformInit();
  if (err != 0) {
    // The firmware is running on the wrong hardware. Halt
    while(1);
  }

  //Launch the system task that will initialize and start everything
  systemLaunch();

  //Start the FreeRTOS scheduler
  vTaskStartScheduler();

  //TODO: Move to platform launch failed
  ledInit();
  ledSet(0, 1);
  ledSet(1, 1);

  //Should never reach this point!
  while(1);

  return 0;
}
开发者ID:bitcraze,项目名称:crazyflie-firmware,代码行数:25,代码来源:main.c


示例4: m_loader_init_complete

SenseClient::SenseClient()
  : m_loader_init_complete(false), m_new_width(800), m_new_height(600), m_width(800), m_height(600)
{
  m_manager = new EntityManager;

  platformInit();
  m_pipeline = new Pipeline;
  if(!Loader::isThreaded()) {
    platformInitLoader();
    m_loader = m_pipeline->createLoader();
  }
  platformDetachContext(); // Some platforms (notably X11 with OpenGL) require contexts be unbound before sharing resources
  m_loader_thread = boost::thread(std::mem_fun(&SenseClient::runLoaderThread), this);
  while(!m_loader_init_complete) {}
  platformAttachContext();
  if(!loader_error_string.empty()) {
    m_loader_thread.join();
    delete m_pipeline;
    platformFinish();
    throw std::runtime_error(loader_error_string.c_str());
  }

  framebuffer = m_pipeline->createRenderTarget(width(), height(), false);
  m_pipeline->setViewport(width(), height());

  setupPythonModule();

  readScriptsDir("../data/materials", ".smtl");
  readScriptsDir("../data/definitions", ".sdef");

  m_pipeline->loadPipelineData(m_datamgr);
  m_test_ent = m_manager->createEntity("dummy");
};
开发者ID:senseproject,项目名称:SensEngine,代码行数:33,代码来源:Client.cpp


示例5: main

int main(void) {
   volatile unsigned int initFlg = 1;
   platformInit();
   static char  buf[512];
   static char  fmmirrorbuf[512];
   for(int i=0;i < sizeof buf; i++){
      buf[i] = i;
   }


////////////////////////////////////////////
//dmtimerInitForMatch(MODULE_ID_TIMER3,0xffffffff-0x7ffffff,(0xffffffff-0x7ffffff/2),DMTIMER_FLAG_INTENABLE_MATCH);

//////////////////////////////////////////////////////
/*   spiFmromInit(fmmirrorbuf, sizeof fmmirrorbuf);
   spiFmromRead(0, buf, 1);
   spiFmromWren();
   delay(500);
   spiFmromWrite(0, buf, sizeof buf); 
   delay(500);
   spiFmromRead(0, buf, sizeof buf);
   while (1);*/
   moduleEnable(MODULE_ID_GPIO0);
   LCDRasterStart();    //lcd
   LCDBackLightON();
   MMCSDP_CtrlInfoInit(&mmcsdctr[0], MODULE_ID_MMCSD0, 48000000, MMCSD_BUSWIDTH_4BIT, 0,
                       &card0, NULL, NULL, NULL);
   MMCSDP_CtrlInit(&mmcsdctr[0]);
   MMCSDP_CardInit(&mmcsdctr[0], MMCSD_CARD_AUTO);
   TouchCalibrate(0);
   static FATFS inandfs;
   f_mount(0, &inandfs);
   initFont(FONT_LOAD_ADDR);
   drawText();
}
开发者ID:httpftpli,项目名称:AMLB_project,代码行数:35,代码来源:mmc_inand_fat.c


示例6: m_maxCharWidth

SimpleFontData::SimpleFontData(const FontPlatformData& f, bool customFont, bool loading, SVGFontData* svgFontData)
    : m_maxCharWidth(-1)
    , m_avgCharWidth(-1)
    , m_unitsPerEm(defaultUnitsPerEm)
    , m_platformData(f)
    , m_treatAsFixedPitch(false)
#if ENABLE(SVG_FONTS)
    , m_svgFontData(svgFontData)
#endif
    , m_isCustomFont(customFont)
    , m_isLoading(loading)
    , m_smallCapsFontData(0)
#if (PLATFORM(WKC))
    , m_lineSpacing(0)
#endif
{
#if !ENABLE(SVG_FONTS)
    UNUSED_PARAM(svgFontData);
#else
    if (SVGFontFaceElement* svgFontFaceElement = svgFontData ? svgFontData->svgFontFaceElement() : 0) {
        m_unitsPerEm = svgFontFaceElement->unitsPerEm();

        double scale = f.size();
        if (m_unitsPerEm)
            scale /= m_unitsPerEm;

        m_ascent = static_cast<int>(svgFontFaceElement->ascent() * scale);
        m_descent = static_cast<int>(svgFontFaceElement->descent() * scale);
        m_xHeight = static_cast<int>(svgFontFaceElement->xHeight() * scale);
        m_lineGap = 0.1f * f.size();
        m_lineSpacing = m_ascent + m_descent + m_lineGap;

        SVGFontElement* associatedFontElement = svgFontFaceElement->associatedFontElement();

        Vector<SVGGlyphIdentifier> spaceGlyphs;
        associatedFontElement->getGlyphIdentifiersForString(String(" ", 1), spaceGlyphs);
        m_spaceWidth = spaceGlyphs.isEmpty() ? m_xHeight : static_cast<float>(spaceGlyphs.first().horizontalAdvanceX * scale);

        Vector<SVGGlyphIdentifier> numeralZeroGlyphs;
        associatedFontElement->getGlyphIdentifiersForString(String("0", 1), numeralZeroGlyphs);
        m_avgCharWidth = numeralZeroGlyphs.isEmpty() ? m_spaceWidth : static_cast<float>(numeralZeroGlyphs.first().horizontalAdvanceX * scale);

        Vector<SVGGlyphIdentifier> letterWGlyphs;
        associatedFontElement->getGlyphIdentifiersForString(String("W", 1), letterWGlyphs);
        m_maxCharWidth = letterWGlyphs.isEmpty() ? m_ascent : static_cast<float>(letterWGlyphs.first().horizontalAdvanceX * scale);

        // FIXME: is there a way we can get the space glyph from the SVGGlyphIdentifier above?
        m_spaceGlyph = 0;
        determinePitch();
        m_adjustedSpaceWidth = roundf(m_spaceWidth);
        m_missingGlyphData.fontData = this;
        m_missingGlyphData.glyph = 0;
        return;
    }
#endif

    platformInit();
    platformGlyphInit();
    platformCharWidthInit();
}
开发者ID:flying-dutchmen,项目名称:3DS_w3Browser,代码行数:60,代码来源:SimpleFontData.cpp


示例7: request

SpikeHw::SpikeHw(IrqCallback callback)
    : request(0), indication(0), dmaManager(0), didReset(false)
{
    request = new SpikeHwRequestProxy(IfcNames_SpikeHwRequestS2H);
    indication = new SpikeHwIndication(IfcNames_SpikeHwIndicationH2S, callback);
    dmaManager = platformInit();
    request->setFlashParameters(100);
}
开发者ID:tudang,项目名称:connectal,代码行数:8,代码来源:spikehw.cpp


示例8: main

int main(int argc, const char **argv)
{
    int test_result = 0;
    int srcAlloc;
    unsigned int *srcBuffer = 0;

    fprintf(stderr, "Main::%s %s\n", __DATE__, __TIME__);
    DmaManager *dma = platformInit();
    ReadTestRequestProxy *device = new ReadTestRequestProxy(IfcNames_ReadTestRequestS2H,TILE_NUMBER);
    ReadTestIndication memReadIndication(IfcNames_ReadTestIndicationH2S,TILE_NUMBER);

    fprintf(stderr, "Main::allocating memory...\n");
    srcAlloc = portalAlloc(alloc_sz, 0);
    srcBuffer = (unsigned int *)portalMmap(srcAlloc, alloc_sz);
    for (int i = 0; i < numWords; i++)
        srcBuffer[i] = i;
    portalCacheFlush(srcAlloc, srcBuffer, alloc_sz, 1);
    fprintf(stderr, "Main::flush and invalidate complete\n");

    /* Test 1: check that match is ok */
    unsigned int ref_srcAlloc = dma->reference(srcAlloc);
    fprintf(stderr, "ref_srcAlloc=%d\n", ref_srcAlloc);
    fprintf(stderr, "Main::orig_test read numWords=%d burstLen=%d iterCnt=%d\n", numWords, burstLen, iterCnt);
    portalTimerStart(0);
    device->startRead(ref_srcAlloc, numWords * 4, burstLen * 4, iterCnt);
    sem_wait(&test_sem);
    if (mismatchCount) {
        fprintf(stderr, "Main::first test failed to match %d.\n", mismatchCount);
        test_result++;     // failed
    }
    platformStatistics();

    /* Test 2: check that mismatch is detected */
    srcBuffer[0] = -1;
    srcBuffer[numWords/2] = -1;
    srcBuffer[numWords-1] = -1;
    portalCacheFlush(srcAlloc, srcBuffer, alloc_sz, 1);

    fprintf(stderr, "Starting second read, mismatches expected\n");
    mismatchCount = 0;
    device->startRead(ref_srcAlloc, numWords * 4, burstLen * 4, iterCnt);
    sem_wait(&test_sem);
    if (mismatchCount != 3/*number of errors introduced above*/ * iterCnt) {
        fprintf(stderr, "Main::second test failed to match mismatchCount=%d (expected %d) iterCnt=%d numWords=%d.\n",
            mismatchCount, 3*iterCnt,
            iterCnt, numWords);
        test_result++;     // failed
    }
#if 0
    MonkitFile pmf("perf.monkit");
    pmf.setHwCycles(cycles)
        .setReadBwUtil(read_util)
        .writeFile();
#endif
    return test_result;
}
开发者ID:8l,项目名称:connectal,代码行数:56,代码来源:testmemread.cpp


示例9: gameInit

/*
 * Initializes the game, if there are no problems returns GAME_ERROR_NONE.
 */
int gameInit(StcGame *game) {
    int errorCode;

    errorCode = platformInit(game);
    if (errorCode == GAME_ERROR_NONE) {
        startGame(game);
        return GAME_ERROR_NONE;
    }
    return errorCode;
};
开发者ID:pelrun,项目名称:CHDK,代码行数:13,代码来源:gui_tetris.c


示例10: commonInit

void commonInit(void)
{
	platformInit();
	timerInit();
	GPIOInit();
	USB_UserInit();

  	debug_frmwrk_init_clk(CLKFREQ);
	lpc_printf("M4 start\n");
}
开发者ID:AndriiDSD,项目名称:pixy,代码行数:10,代码来源:pixy_init.cpp


示例11: init

bool OWindow::init()
{
    if (!platformInit()) {
        OErrLog("Platform initialization failed !");
        return false;
    }

    ODirector::director()->setFrameSize(m_Width, m_Height);
    ODirector::director()->loadGame();

    return true;
}
开发者ID:Uliori,项目名称:Origami,代码行数:12,代码来源:OWindow.cpp


示例12: m_radial

Gradient::Gradient(const FloatPoint& p0, float r0, const FloatPoint& p1, float r1)
    : m_radial(true)
    , m_p0(p0)
    , m_p1(p1)
    , m_r0(r0)
    , m_r1(r1)
    , m_stopsSorted(false)
    , m_lastStop(0)
    , m_spreadMethod(SpreadMethodPad)
{
    platformInit();
}
开发者ID:Mr-Kumar-Abhishek,项目名称:qt,代码行数:12,代码来源:Gradient.cpp


示例13: Font

Font::Font(const FontPlatformData& platformData, bool isCustomFont, bool isLoading, bool isTextOrientationFallback)
    : Font(platformData, std::unique_ptr<SVGData>(), isCustomFont, isLoading, isTextOrientationFallback)
{
    platformInit();
    platformGlyphInit();
    platformCharWidthInit();
#if ENABLE(OPENTYPE_VERTICAL)
    if (platformData.orientation() == Vertical && !isTextOrientationFallback) {
        m_verticalData = platformData.verticalData();
        m_hasVerticalGlyphs = m_verticalData.get() && m_verticalData->hasVerticalMetrics();
    }
#endif
}
开发者ID:alexgcastro,项目名称:webkit,代码行数:13,代码来源:Font.cpp


示例14: m_panelColor

RenderThemeGtk::RenderThemeGtk()
    : m_panelColor(Color::white)
    , m_sliderColor(Color::white)
    , m_sliderThumbColor(Color::white)
    , m_mediaIconSize(16)
    , m_mediaSliderHeight(14)
{
    platformInit();
#if ENABLE(VIDEO)
    initMediaColors();
    initMediaButtons();
#endif
}
开发者ID:Wrichik1999,项目名称:webkit,代码行数:13,代码来源:RenderThemeGtk.cpp


示例15: m_radial

Gradient::Gradient(const FloatPoint& p0, const FloatPoint& p1)
    : m_radial(false)
    , m_p0(p0)
    , m_p1(p1)
    , m_r0(0)
    , m_r1(0)
    , m_aspectRatio(1)
    , m_stopsSorted(false)
    , m_lastStop(0)
    , m_spreadMethod(SpreadMethodPad)
{
    platformInit();
}
开发者ID:dslab-epfl,项目名称:warr,代码行数:13,代码来源:Gradient.cpp


示例16: eglGetDisplay

void QDirectFbScreenEGL::initializeEGL()
{
    m_eglDisplay = eglGetDisplay(EGL_DEFAULT_DISPLAY);
    if (m_eglDisplay == EGL_NO_DISPLAY)
        return;

    platformInit();

    EGLint major, minor;
    eglBindAPI(EGL_OPENGL_ES_API);
    eglInitialize(m_eglDisplay, &major, &minor);
    return;
}
开发者ID:ghjinlei,项目名称:qt5,代码行数:13,代码来源:qdirectfb_egl.cpp


示例17: m_radial

Gradient::Gradient(const FloatPoint& p0, float r0, const FloatPoint& p1, float r1, float aspectRatio)
    : m_radial(true)
    , m_p0(p0)
    , m_p1(p1)
    , m_r0(r0)
    , m_r1(r1)
    , m_aspectRatio(aspectRatio)
    , m_stopsSorted(false)
    , m_spreadMethod(SpreadMethodPad)
    , m_cachedHash(0)
{
    platformInit();
}
开发者ID:eocanha,项目名称:webkit,代码行数:13,代码来源:Gradient.cpp


示例18: pixyInit

void pixyInit(uint32_t slaveRomStart, const unsigned char slaveImage[], uint32_t imageSize)
{
	platformInit();

	// button, SPI_SSEL
	LPC_GPIO_PORT->MASK[5] = 0;
	LPC_GPIO_PORT->PIN[5] = 0x20; // negate SPI_SS
	LPC_GPIO_PORT->DIR[5] = 0x20; // SPI_SS - output

	// deal with P4_1, GPIO2[1]
	LPC_GPIO_PORT->MASK[2] = 0;
	LPC_GPIO_PORT->DIR[2] = 0;

	// set timer so we count clock cycles
	LPC_TIMER1->IR = 0;
 	LPC_TIMER1->TCR = 1;
	LPC_TIMER1->PR = 0;

	// microsecond timer
	LPC_TIMER2->IR = 0;
 	LPC_TIMER2->TCR = 1;
	LPC_TIMER2->PR = CLKFREQ_US-1;

  	debug_frmwrk_init_clk(CLKFREQ);

	USB_UserInit();

	lpc_printf("M4 start\n");

	IPC_haltSlave();

	ADCInit();
   	SCTInit();
	CameraInit();

	// start slave
	IPC_downloadSlaveImage(slaveRomStart, slaveImage, imageSize);
	IPC_startSlave();

	// initialize chirp objects
	g_chirpUsb = new ChirpUsb();
  	g_chirpM0 = new ChirpM0();

	// initialize devices/modules
	pwr_init();
	spi_init();
	cam_init();
	rcs_init();
	led_init();
	//cc_init();
}
开发者ID:achambers16,项目名称:pixy,代码行数:51,代码来源:pixy_init.cpp


示例19: Java_com_studio_artaban_kaleidoscope_EngLibrary_init

JNIEXPORT void Java_com_studio_artaban_kaleidoscope_EngLibrary_init(JNIEnv* env, jobject obj, jobject activity,
        jint millis, jfloat accelRange, jfloat xDpi, jfloat yDpi) {

    std::string className(JAVA_PROJECT_NAME);
    className.append(LIBENG_ACTIVITY_CLASS);

    activityClass = static_cast<jclass>(env->NewGlobalRef(env->FindClass(className.c_str())));
    if (!activityClass)
        __android_log_print(ANDROID_LOG_ERROR, "JNI", "Failed to find activity class: %s", className.c_str());

    activityObject = env->NewGlobalRef(activity);
    if (!activityObject)
        __android_log_print(ANDROID_LOG_ERROR, "JNI", "Failed to get activity object");

#ifdef LIBENG_ENABLE_SOCIAL
    className = JAVA_PROJECT_NAME;
    className.append(LIBENG_FACEBOOK_CLASS);
    facebookClass = static_cast<jclass>(env->NewGlobalRef(env->FindClass(className.c_str())));
    if (!facebookClass)
        __android_log_print(ANDROID_LOG_ERROR, "JNI", "Failed to find facebook class");

    className = JAVA_PROJECT_NAME;
    className.append(LIBENG_TWITTER_CLASS);
    twitterClass = static_cast<jclass>(env->NewGlobalRef(env->FindClass(className.c_str())));
    if (!twitterClass)
        __android_log_print(ANDROID_LOG_ERROR, "JNI", "Failed to find twitter class");

    className = JAVA_PROJECT_NAME;
    className.append(LIBENG_GOOGLE_CLASS);
    googleClass = static_cast<jclass>(env->NewGlobalRef(env->FindClass(className.c_str())));
    if (!googleClass)
        __android_log_print(ANDROID_LOG_ERROR, "JNI", "Failed to find google class");
#endif

    PlatformData platformData;
    platformData.jvm = javaVM;
    platformData.jpn = JAVA_PROJECT_NAME;
    platformData.cls = activityClass;
    platformData.obj = activityObject;
#ifdef LIBENG_ENABLE_SOCIAL
    platformData.facebook = facebookClass;
    platformData.twitter = twitterClass;
    platformData.google = googleClass;
#endif
    platformData.accelRange = static_cast<float>(accelRange);
    platformData.xDpi = static_cast<float>(xDpi);
    platformData.yDpi = static_cast<float>(yDpi);

    init(platformData);
    platformInit(static_cast<long>(millis), &platformData);
}
开发者ID:STUDIO-Artaban,项目名称:Kaleidoscope,代码行数:51,代码来源:JNI.cpp


示例20: main

int main(int argc, const char **argv)
{
    unsigned int srcGen = 0;
    NandSimRequestProxy *device = 0;
    NandSimIndication *deviceIndication = 0;

    fprintf(stderr, "Main::%s %s\n", __DATE__, __TIME__);

    device = new NandSimRequestProxy(IfcNames_NandSimRequest);
    deviceIndication = new NandSimIndication(IfcNames_NandSimIndication);
    DmaManager *dma = platformInit();

    fprintf(stderr, "Main::allocating memory...\n");

    srcAlloc = portalAlloc(numBytes, 0);
    srcBuffer = (unsigned int *)portalMmap(srcAlloc, numBytes);
    fprintf(stderr, "fd=%d, srcBuffer=%p\n", srcAlloc, srcBuffer);

    for (int i = 0; i < numBytes/sizeof(srcBuffer[0]); i++)
        srcBuffer[i] = srcGen++;

    portalCacheFlush(srcAlloc, srcBuffer, numBytes, 1);
    fprintf(stderr, "Main::flush and invalidate complete\n");
    sleep(1);

    unsigned int ref_srcAlloc = dma->reference(srcAlloc);

    nandAlloc = portalAlloc(nandBytes, 0);
    int ref_nandAlloc = dma->reference(nandAlloc);
    fprintf(stderr, "NAND alloc fd=%d ref=%d\n", nandAlloc, ref_nandAlloc);
    device->configureNand(ref_nandAlloc, nandBytes);
    deviceIndication->wait();

    fprintf(stderr, "Main::starting write ref=%d, len=%08zx\n", ref_srcAlloc, numBytes);
    device->startWrite(ref_srcAlloc, 0, 0, numBytes, 16);
    deviceIndication->wait();

    fprintf(stderr, "Main::starting read %08zx\n", numBytes);
    device->startRead(ref_srcAlloc, 0, 0, numBytes, 16);
    deviceIndication->wait();

    fprintf(stderr, "Main::starting erase %08zx\n", numBytes);
    device->startErase(0, numBytes);
    deviceIndication->wait();

    fprintf(stderr, "Main::starting read %08zx\n", numBytes);
    device->startRead(ref_srcAlloc, 0, 0, numBytes, 16);
    deviceIndication->wait();
    return 0;
}
开发者ID:jameyhicks,项目名称:connectal,代码行数:50,代码来源:testnandsim.cpp



注:本文中的platformInit函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ platformPath函数代码示例发布时间:2022-05-30
下一篇:
C++ platformDestroy函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap