当前位置: 首页>>代码示例>>C++>>正文


C++ configure_console函数代码示例

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


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

示例1: main

/**
 * \brief Main application
 */
int main(void)
{
	/* Initialize the SAM system */
	sysclk_init();

	/* Initialize the board */
	board_init();

	/*Configure UART console.*/
	configure_console();

	/* Configure the I2C master module */
	configure_i2c_master();

	/* Output example information */
	puts(STRING_HEADER);

	/* Show the extension boards information */
	show_extension_boards_information();

#ifdef CONF_KIT_DATA_EXIST
	/* Show the kit data */
	show_kit_data();
#endif

	while (1) {
		/* Infinite loop */
	}

}
开发者ID:InSoonPark,项目名称:asf,代码行数:33,代码来源:main.c

示例2: main

/**
 *  \brief pmc_clock_failure_detect_example Application entry point.
 *
 *  Enable Clock Failure Detection function in PMC, turn on a LED to indicate
 *  that a clock failure is detected.
 *
 *  \return Unused (ANSI-C compatibility).
 */
int main(void)
{
	/* Initialize the SAM system. */
	sysclk_init();
	board_init();

	/* Initialize the console UART. */
	configure_console();

	/* Output example information. */
	puts(STRING_HEADER);

	/* Turn off the LED. */
#if (SAM4E || SAM4N || SAM4C)
		LED_Off(LED0);
#elif (SAM4CM)
		LED_Off(LED4);
#else
		LED_Off(EXAMPLE_LED);
#endif

	/* Enable Clock Failure Detector. */
	pmc_enable_clock_failure_detector();

	/* Enable Clock Failure Detector Event interrupt. */
	NVIC_EnableIRQ(PMC_IRQn);
	pmc_enable_interrupt(PMC_IER_CFDEV);

	puts("-I- Short XIN or XOUT to ground to force a clock failure.\n\r");

	while (1) {
		/* Infinite loop */
	}
}
开发者ID:AndreyMostovov,项目名称:asf,代码行数:42,代码来源:pmc_clock_failure_detect_example.c

示例3: main

/* HUVUDPROGRAM */
int main (void)
{
	/* INITIERING */
	sysclk_init();			// Systemklocka.
	board_init();			// Arduino-kort.
	configure_console();	// Konsoll-/terminalfönster.
	adc_setup();			// AD-omvandlare.
	pwm_setup();			// PWM-signal.
	motor_shield_setup();	// Motor-shield.

	/* PROCESS 1 - PID-REGLERING */
	if (xTaskCreate(pid, (const signed char * const) "PID-reglering", 1024, NULL, 2, NULL) != pdPASS)
	{
		printf("Misslyckades med att skapa process för PID-reglering.\r\n");
	}
	
	/* PROCESS 2 - KOMMUNIKATION MATLAB */
	if (xTaskCreate(matlab, (const signed char * const) "Matlab-kommunikation", 1024, NULL, 1, NULL) != pdPASS)
	{
		printf("Misslyckades med att skapa process för kommunikation med Matlab.\r\n");
	}
	
	// Schemaläggning startar.
	vTaskStartScheduler();
}
开发者ID:kajm,项目名称:PingPong,代码行数:26,代码来源:main.c

示例4: main

int main (void)
{
	uint8_t tiles[6] = {0,0,0,0,0,0}, receivedData,i = 0;
	int quotient;
	system_init();
	ext_usart_clock_init();
	ext_usart_pin_init();
	ext_usart_init();
	configure_console();
	printf("Up and running!\r");
	while (1) {
		receivedData = USART_Receive();
		quotient = receivedData;
		i = 0;
		while(quotient != 0) {
			tiles[i] = quotient%2;
			quotient /= 2;
			i++;
		}
		for(int i = 0; i < 6; i++) {
			printf("%d",tiles[i]);
			tiles[i] = 0;
		}
	printf("\n");
	}
}
开发者ID:AmoliShah,项目名称:Divyadrishti,代码行数:26,代码来源:main.c

示例5: main

/**
 * \brief main function : do init and loop
 */
int main(void)
{
	system_init();
	configure_console();
	delay_init();

	/* Turn on the backlight. */
	port_pin_set_output_level(SLCD_BACLKLIGHT,true);

	printf("Start SLCD test\r\n");
	/* Initialize the C42412A LCD glass component. */
	c42412a_init();

	c42412a_show_all();
	c42412a_set_contrast(0x8);
	delay_s(1);
	c42412a_clear_all();

	c42412a_icon_test();
	delay_s(1);
	c42412a_blink_test();
	delay_s(1);
	c42412a_text_test();
	delay_s(1);
	c42412a_num_dec_test();
	delay_s(1);
	c42412a_animation_test();
	while (1) {
	}
}
开发者ID:thegeek82000,项目名称:asf,代码行数:33,代码来源:c42412a_example.c

示例6: main

/**
 *  \brief FreeRTOS Real Time Kernel example entry point.
 *
 *  \return Unused (ANSI-C compatibility).
 */
int main(void)
{
    /* Initilize the SAM system */
    sysclk_init();
    board_init();

    /* Initialize the console uart */
    configure_console();

    /* Output demo infomation. */
    printf("-- Freertos Example --\n\r");
    printf("-- %s\n\r", BOARD_NAME);
    printf("-- Compiled: %s %s --\n\r", __DATE__, __TIME__);

    /* Create task to monitor processor activity */
    if (xTaskCreate(task_monitor, "Monitor", TASK_MONITOR_STACK_SIZE, NULL,
                    TASK_MONITOR_STACK_PRIORITY, NULL) != pdPASS) {
        printf("Failed to create Monitor task\r\n");
    }

    /* Create task to make led blink */
    if (xTaskCreate(task_led, "Led", TASK_LED_STACK_SIZE, NULL,
                    TASK_LED_STACK_PRIORITY, NULL) != pdPASS) {
        printf("Failed to create test led task\r\n");
    }

    /* Start the scheduler. */
    vTaskStartScheduler();

    /* Will only get here if there was insufficient memory to create the idle task. */
    return 0;
}
开发者ID:Realtime-7,项目名称:asf,代码行数:37,代码来源:main.c

示例7: main

int main(void)
{
	/* Initiera SAM systemet */
	sysclk_init();
	board_init();
	configure_console();
	/* Print demo information */
	printf("-- Freertos Exempel - Semaforer --\n\r");
	printf("-- %s\n\r", BOARD_NAME);
	printf("-- Kompilerad: %s %s --\n\r", __DATE__, __TIME__);
	/* a semaphore cannot be used wihtout calling vSemaphoreCreateBinary() */
	vSemaphoreCreateBinary(semafor_signal);
	/* Create the task giving the semaphore */
	if (xTaskCreate(task1, (const signed char * const) "Task1", 1024, NULL, 1,
	NULL) != pdPASS)
	{
		printf("Misslyckades med att skapa Boss tasken\r\n");
	}
	/* Create a task taking the semaphore and doing it’s stuff */
	if (xTaskCreate(task2, (const signed char * const) "Task2", 1024, NULL, 2,
	NULL) != pdPASS)
	{
		printf("Misslyckades med att skapa Employee tasken\r\n");
	}
	/* Start the scheduler */
	vTaskStartScheduler();
}
开发者ID:VT2014ProjektGrp3,项目名称:EmmyNoether,代码行数:27,代码来源:main.c

示例8: main

/**
 * \brief Application entry point for TRNG example.
 *
 * Enable the TRNG, display the generated random value.
 *
 * \return Unused (ANSI-C compatibility).
 */
int main(void)
{
	/* Initialize the SAM system */
	sysclk_init();
	board_init();

	/* Configure console UART */
	configure_console();

	/* Output example information */
	printf("-- TRNG Example --\n\r");
	printf("-- %s\n\r", BOARD_NAME);
	printf("-- Compiled: %s %s --\n\r", __DATE__, __TIME__);

	/* Configure PMC */
	pmc_enable_periph_clk(ID_TRNG);

	/* Enable TRNG */
	trng_enable(TRNG);

	/* Enable TRNG interrupt */
	NVIC_DisableIRQ(TRNG_IRQn);
	NVIC_ClearPendingIRQ(TRNG_IRQn);
	NVIC_SetPriority(TRNG_IRQn, 0);
	NVIC_EnableIRQ(TRNG_IRQn);
	trng_enable_interrupt(TRNG);

	/* User input loop */
	while (1) {
	}
}
开发者ID:AndreyMostovov,项目名称:asf,代码行数:38,代码来源:trng_example.c

示例9: main

/**
 * \brief Application entry point for AT30TS(E)75x Component Example.
 *
 * \return Unused (ANSI-C compatibility).
 */
int main(void)
{
	double temp = 0;

	/* Initialize the SAM system */
	sysclk_init();

	/* Initialize the board */
	board_init();

	/* Initialize the console UART */
	configure_console();

	/* Output example information */
	puts(STRING_HEADER);

	memset(tx, 0xFF, NB_BYTE);

	/* Initialize AT30TS(E)75x */
	at30tse_init();

#if BOARD_USING_AT30TSE != AT30TS75
	uint32_t i;
	/* Write pages in EEPROM */
	for (i = 0; i < NB_PAGE; i++) {
		tx[NB_PAGE - 1] = i;
		if (at30tse_eeprom_write(tx, NB_BYTE, 0, i) != TWI_SUCCESS) {
			puts("Write EEPROM error\r");
			return 0;
		}
		delay_ms(5);
	}
	puts("Write EEPROM OK\r");

	/* Read each page in EEPROM and compare them */
	for (i = 0; i < NB_PAGE; i++) {
		memset(rx, 0, NB_BYTE);
		if (at30tse_eeprom_read(rx, NB_BYTE, 0, i) != TWI_SUCCESS) {
			puts("Read EEPROM error\r");
			return 0;
		} else {
			if (memcmp(tx, rx, NB_BYTE - 1) && (rx[NB_PAGE - 1] != i)) {
				puts("Comparison error\r");
				return 0;
			}
		}
	}
	puts("Read EEPROM & Compare OK\r");
#endif

	/* Read temperature every second */
	while (1) {
		if (at30tse_read_temperature(&temp) != TWI_SUCCESS) {
			puts("Read temperature error\r");
			return 0;
		}
		printf("Read temperature:\t%d\r\n", (int)temp);
		delay_ms(1000);
	}
}
开发者ID:ThucVD2704,项目名称:femto-usb-blink-example,代码行数:65,代码来源:at30tes_example.c

示例10: main

int main (void)
{
	/* Initialize the SAM system */
	sysclk_init();
	
	/* Initialize mcu's peripheral.*/
	board_init();
	
	/* Initialize the console uart */
	configure_console();
	
	/* Output demo information. */
	RS232printf("\n\r-- FreeRTOS Example --\n\r");
	
	/* Initialize the SPI0. */
//	spi_set_clock_configuration(0);
	
	/* Ensure all priority bits are assigned as preemption priority bits. */
	NVIC_SetPriorityGrouping( 0 );
		
	/* Create freeRTOS START task.*/
	xTaskCreate(task_start, (signed char *)"START", TASK_START_STACKSIZE, NULL,
				TASK_START_PRIORITY, NULL);
	
	/* Start the scheduler. */
	vTaskStartScheduler();
	
	/* Will only get here if there was insufficient memory to create the idle task. */
	return 0;
}
开发者ID:navinars,项目名称:etz-main,代码行数:30,代码来源:main.c

示例11: main

/**
 * \brief Application entry point for smc_lcd example.
 *
 * \return Unused (ANSI-C compatibility).
 */
int main(void)
{
	sysclk_init();

	board_init();

	/** Initialize debug console */
	configure_console();

	/* Disable the watchdog */
	WDT->WDT_MR = WDT_MR_WDDIS;

	/** Configura o timer */
	configure_tc();
	
	/* Configura os botões */
	configure_buttons();
	configure_display();
	init_tela();
	
	/** Draw text, image and basic shapes on the LCD */
		//ili93xx_set_foreground_color(COLOR_BLACK);
		//ili93xx_draw_string(10, 20, (uint8_t *)"ili93xx_lcd example");
	


	while (1) {
	}
}
开发者ID:kaiostrippoli,项目名称:Entregas,代码行数:34,代码来源:ili93xx_example.c

示例12: main

/**
 * \brief Application entry point.
 *
 * \return Unused (ANSI-C compatibility).
 */
int main(void)
{
	uint8_t uc_key;

	/* Initialize the SAM system. */
	sysclk_init();
	board_init();

	configure_console();

	/* Output example information. */
	puts(STRING_HEADER);

	g_afec0_sample_data = 0;
	g_afec1_sample_data = 0;
	g_max_digital = MAX_DIGITAL_12_BIT;

	set_afec_test();

	while (1) {
		afec_start_software_conversion(AFEC0);
		delay_ms(g_delay_cnt);

		/* Check if the user enters a key. */
		if (!uart_read(CONF_UART, &uc_key)) {
			/* Disable all afec interrupt. */
			afec_disable_interrupt(AFEC0, AFEC_INTERRUPT_ALL);
			afec_disable_interrupt(AFEC1, AFEC_INTERRUPT_ALL);
			tc_stop(TC0, 0);
			set_afec_test();
		}
	}
}
开发者ID:InSoonPark,项目名称:asf,代码行数:38,代码来源:afec_example4.c

示例13: main

/**
 * \brief The main function.
 */
int main(void)
{
	/* Initialize the SAM system */
	sysclk_init();
	board_init();

	/* Initialize the console  */
	configure_console();

	/* Output example information */
	printf("-- CMCC Example --\r\n");
	printf("-- %s\n\r", BOARD_NAME);
	printf("-- Compiled: %s %s --\n\r", __DATE__, __TIME__);

	/* Enable the CMCC module. */
	cmcc_get_config_defaults(&g_cmcc_cfg);
	cmcc_init(CMCC_BASE, &g_cmcc_cfg);
	cmcc_enable(CMCC_BASE);

	/* Do the Fibonacci calculation. */
	recfibo(FIBONACCI_NUM);
	printf("Fibonacci calculation completed \r\n");
	printf("Cache Data hit: %ld \r\n", cmcc_get_monitor_cnt(CMCC_BASE));

	while (true) {
	}
}
开发者ID:thegeek82000,项目名称:asf,代码行数:30,代码来源:cmcc_example.c

示例14: main

/**
 * \brief Main application function.
 *
 * Application entry point.
 *
 * \return program return value.
 */
int main(void)
{
	tstrWifiInitParam param;
	int8_t ret;

	/* Initialize the board. */
	system_init();

	/* Initialize the UART console. */
	configure_console();
	printf(STRING_HEADER);

	/* Initialize the BSP. */
	nm_bsp_init();

	/* Initialize Wi-Fi parameters structure. */
	memset((uint8_t *)&param, 0, sizeof(tstrWifiInitParam));

	/* Initialize Wi-Fi driver with data and status callbacks. */
	ret = m2m_wifi_init(&param);
	if (M2M_SUCCESS != ret) {
		printf("main: m2m_wifi_init call error!(%d)\r\n", ret);
		while (1) {
		}
	}

	/**
	 * Station mode.
	 * Device started as station mode basically.
	 */
	if (1) {
	}

	/**
	 * AP mode.
	 * On and off AP mode.
	 */
	ret = enable_disable_ap_mode();
	if (M2M_SUCCESS != ret) {
		printf("main: enable_disable_ap_mode call error!\r\n");
		while (1) {
		}
	}

	nm_bsp_sleep(DELAY_FOR_MODE_CHANGE);

	/**
	 * P2P mode.
	 * On and off P2P mode.
	 */
	ret = enable_disable_p2p_mode();
	if (M2M_SUCCESS != ret) {
		printf("main: enable_disable_p2p_mode call error!\r\n");
		while (1) {
		}
	}

	return 0;
}
开发者ID:malachi-iot,项目名称:asf,代码行数:66,代码来源:main21.c

示例15: main

/**
 * \brief Main application function.
 *
 * Application entry point.
 *
 * \return program return value.
 */
int main(void)
{
	tstrWifiInitParam param;
	int8_t ret;

	/* Initialize the board. */
	sysclk_init();
	board_init();

	/* Initialize the UART console. */
	configure_console();
	printf(STRING_HEADER);

	/* Initialize the BSP. */
	nm_bsp_init();

	/* Initialize Wi-Fi parameters structure. */
	memset((uint8_t *)&param, 0, sizeof(tstrWifiInitParam));

	/* Initialize Wi-Fi driver with data and status callbacks. */
	param.pfAppWifiCb = wifi_cb;
	ret = m2m_wifi_init(&param);
	if (M2M_SUCCESS != ret) {
		printf("main: m2m_wifi_init call error!(%d)\r\n", ret);
		while (1) {
		}
	}

	/* Set device name to be shown in peer device. */
	ret = m2m_wifi_set_device_name((uint8_t *)MAIN_WLAN_DEVICE_NAME, strlen(MAIN_WLAN_DEVICE_NAME));
	if (M2M_SUCCESS != ret) {
		printf("main: m2m_wifi_set_device_name call error!\r\n");
		while (1) {
		}
	}

	/* Bring up P2P mode with channel number. */
	ret = m2m_wifi_p2p(M2M_WIFI_CH_6);
	if (M2M_SUCCESS != ret) {
		printf("main: m2m_wifi_p2p call error!\r\n");
		while (1) {
		}
	}

	printf("P2P mode started. You can connect to %s.\r\n", (char *)MAIN_WLAN_DEVICE_NAME);

	while (1) {
		/* Handle pending events from network controller. */
		while (m2m_wifi_handle_events(NULL) != M2M_SUCCESS) {
		}
	}

	return 0;
}
开发者ID:malachi-iot,项目名称:asf,代码行数:61,代码来源:main.c


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