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


C++ INTC_init_interrupts函数代码示例

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


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

示例1: _init_startup

/*
 * Low-level initialization routine called during startup, before the main
 * function.
 * This version comes in replacement to the default one provided by Newlib.
 * Newlib's _init_startup only calls init_exceptions, but Newlib's exception
 * vectors are not compatible with the SCALL management in the current FreeRTOS
 * port. More low-level initializations are besides added here.
 */
void _init_startup(void)
{
	/* Import the Exception Vector Base Address. */
	extern void _evba;

	#if configHEAP_INIT
		extern void __heap_start__;
		extern void __heap_end__;
		BaseType_t *pxMem;
	#endif

	/* Load the Exception Vector Base Address in the corresponding system register. */
	Set_system_register( AVR32_EVBA, ( int ) &_evba );

	/* Enable exceptions. */
	ENABLE_ALL_EXCEPTIONS();

	/* Initialize interrupt handling. */
	INTC_init_interrupts();

	#if configHEAP_INIT

		/* Initialize the heap used by malloc. */
		for( pxMem = &__heap_start__; pxMem < ( BaseType_t * )&__heap_end__; )
		{
			*pxMem++ = 0xA5A5A5A5;
		}

	#endif

	/* Give the used CPU clock frequency to Newlib, so it can work properly. */
	//set_cpu_hz( configCPU_CLOCK_HZ );
}
开发者ID:frankzzcn,项目名称:M2_SE_RTOS_Project,代码行数:41,代码来源:port.c

示例2: Actividad2

void Actividad2(void){
		
		
		pm_switch_to_osc0(&AVR32_PM, FOSC0, OSC0_STARTUP); //osc0 a 12Mhz
		center=0;
		//Interrupciones
		
		Disable_global_interrupt();

		INTC_init_interrupts();

		INTC_register_interrupt(&tecla_lrc_isr, 71, 0);
		INTC_register_interrupt(&tecla_lrc_isr, 70,0);
		gpio_enable_pin_interrupt(QT1081_TOUCH_SENSOR_LEFT,GPIO_RISING_EDGE);
		gpio_enable_pin_interrupt(QT1081_TOUCH_SENSOR_RIGHT,GPIO_RISING_EDGE);
		gpio_enable_pin_interrupt(QT1081_TOUCH_SENSOR_ENTER,GPIO_RISING_EDGE);
		gpio_enable_pin_interrupt(QT1081_TOUCH_SENSOR_UP,GPIO_RISING_EDGE);
		gpio_enable_pin_interrupt(QT1081_TOUCH_SENSOR_DOWN,GPIO_RISING_EDGE);


		Enable_global_interrupt();
		
		
		
		
		while (1){}
	}
开发者ID:AldricLopez,项目名称:EVK1105,代码行数:27,代码来源:PrimerExamenPractico.c

示例3: main

/*! \brief Main function. Execution starts here.
 *
 * \retval 42 Fatal error.
 */
int main(void)
{
#ifndef FREERTOS_USED
  Enable_global_exception();
  INTC_init_interrupts();
#endif
  pcl_switch_to_osc(PCL_OSC0, FOSC0, OSC0_STARTUP);
  init_dbg_rs232(FOSC0);
  pcl_configure_usb_clock();
  usb_task_init();
#if USB_DEVICE_FEATURE == true
  device_template_task_init();
#endif
#if USB_HOST_FEATURE == true
  host_template_task_init();
#endif

#ifdef FREERTOS_USED
  vTaskStartScheduler();
  portDBG_TRACE("FreeRTOS returned.");
  return 42;
#else
  while (true)
  {
    usb_task();
  #if USB_DEVICE_FEATURE == true
    device_template_task();
  #endif
  #if USB_HOST_FEATURE == true
    host_template_task();
  #endif
  }
#endif  // FREERTOS_USED
}
开发者ID:ThucVD2704,项目名称:femto-usb-blink-example,代码行数:38,代码来源:enum_example.c

示例4: boardsupport_init

void boardsupport_init(void) 
{
	central_data_t *central_data;
	irq_initialize_vectors();
	cpu_irq_enable();
	Disable_global_interrupt();
		
	sysclk_init();

	//delay_init(sysclk_get_cpu_hz());
		
	INTC_init_interrupts();

	central_data=central_data_get_pointer_to_struct();
	
	#ifdef TELEMETRY_USE_UART
		uart_int_set_usart_conf(TELEMETRY_UART_INDEX, asv_debug_uart_conf());
		//uart configuration
		uart_int_init(TELEMETRY_UART_INDEX);
		uart_int_register_write_stream(uart_int_get_uart_handle(TELEMETRY_UART_INDEX), &(central_data->wired_out_stream));
		// Registering streams
		buffer_make_buffered_stream_lossy(&(wired_in_buffer), &(central_data->wired_in_stream));
		uart_int_register_read_stream(uart_int_get_uart_handle(TELEMETRY_UART_INDEX), &(central_data->wired_in_stream));
		central_data->debug_in_stream=&central_data->wired_in_stream;
		central_data->debug_out_stream=&central_data->wired_out_stream;

	#endif
		
	central_data_init();

	Enable_global_interrupt();

}
开发者ID:fschill,项目名称:MavBoot,代码行数:33,代码来源:boardsupport.c

示例5: main

/*! \brief Main function. Execution starts here.
 *
 * \retval No return value.
 */
int main(void)
{
#ifdef __GNUC__
	// Initialize the INTC sw driver.
	INTC_init_interrupts();
#endif

	// Configure system clocks.
	if (pcl_configure_clocks(&pcl_freq_param) != PASS)
		while (true);

	// Initialize USB clock (on PLL1)
	pcl_configure_usb_clock();

	// Initialize USB task
	usb_task_init();

#if USB_DEVICE_FEATURE == true
	// Initialize device generic USB task
	device_generic_hid_task_init();
#endif

	// No OS here. Need to call each task in round-robin mode.
	while (true) {
		usb_task();
	#if USB_DEVICE_FEATURE == true
		device_generic_hid_task();
	#endif
	}
}
开发者ID:Mazetti,项目名称:asf,代码行数:34,代码来源:hid_qtouch_debug.c

示例6: init_interrupts

/*! \brief Initializes MCU interrupts.
 */
static void init_interrupts(void)
{
  // Initialize interrupt handling.
  INTC_init_interrupts();

  // Enable interrupts globally.
  Enable_global_interrupt();
}
开发者ID:kerichsen,项目名称:asf,代码行数:10,代码来源:ecchrs_example.c

示例7: __low_level_init

/*! \brief Low-level initialization routine called during startup, before the
 *         main function.
 */
int __low_level_init(void)
{
  // Enable exceptions.
  Enable_global_exception();

  // Initialize interrupt handling.
  INTC_init_interrupts();

  // Request initialization of data segments.
  return 1;
}
开发者ID:kerichsen,项目名称:asf,代码行数:14,代码来源:main.c

示例8: _init_startup

/*
 * Low-level initialization routine called during startup, before the main
 * function.
 * This version comes in replacement to the default one provided by the Newlib
 * add-ons library.
 * Newlib add-ons' _init_startup only calls init_exceptions, but Newlib add-ons'
 * exception vectors are not compatible with the SCALL management in the current
 * FreeRTOS port. More low-level initializations are besides added here.
 */
int _init_startup(void)
{
	/* Import the Exception Vector Base Address. */
	extern void _evba;

	#if configHEAP_INIT
		extern void __heap_start__;
		extern void __heap_end__;
		portBASE_TYPE *pxMem;
	#endif

	/* Load the Exception Vector Base Address in the corresponding system register. */
	Set_system_register( AVR32_EVBA, ( int ) &_evba );

	/* Enable exceptions. */
	ENABLE_ALL_EXCEPTIONS();

	/* Initialize interrupt handling. */
	INTC_init_interrupts();

	#if configHEAP_INIT

		/* Initialize the heap used by malloc. */
		for( pxMem = &__heap_start__; pxMem < ( portBASE_TYPE * )&__heap_end__; )
		{
			*pxMem++ = 0xA5A5A5A5;
		}

	#endif

	/* Give the used PBA clock frequency to Newlib, so it can work properly. */
	set_cpu_hz( configPBA_CLOCK_HZ );

	/* Code section present if and only if the debug trace is activated. */
	#if configDBG
	{
		static const gpio_map_t DBG_USART_GPIO_MAP =
		{
			{ configDBG_USART_RX_PIN, configDBG_USART_RX_FUNCTION },
			{ configDBG_USART_TX_PIN, configDBG_USART_TX_FUNCTION }
		};

		/* Initialize the USART used for the debug trace with the configured parameters. */
		set_usart_base( ( void * ) configDBG_USART );
		gpio_enable_module( DBG_USART_GPIO_MAP,
		                    sizeof( DBG_USART_GPIO_MAP ) / sizeof( DBG_USART_GPIO_MAP[0] ) );
		usart_init( configDBG_USART_BAUDRATE );
	}
	#endif

  // Don't-care value for GCC.
  return 1;
}
开发者ID:lofturj,项目名称:sdr-widget,代码行数:62,代码来源:port.c

示例9: _init

void _init(void)
{
	sysclk_init();
	
	// Disable all interrupts.
	Disable_global_interrupt();

	// Initialize interrupt vectors.
	INTC_init_interrupts();
	
	// Enable all interrupts.
	Enable_global_interrupt();
}
开发者ID:akhilvinod007,项目名称:yus-repo,代码行数:13,代码来源:platform.cpp

示例10: __low_level_init

/*! \brief Low-level initialization routine called during startup, before the
 *         main function.
 */
int __low_level_init(void)
{
  // Enable exceptions.
  Enable_global_exception();

  // Initialize interrupt handling.
  INTC_init_interrupts();

  // Initialize the USART used for the debug trace with the configured parameters.
  extern volatile avr32_usart_t *volatile stdio_usart_base;
  stdio_usart_base = DBG_USART;

  // Request initialization of data segments.
  return 1;
}
开发者ID:InSoonPark,项目名称:asf,代码行数:18,代码来源:cdc_example.c

示例11: _init_startup

/*! \brief Low-level initialization routine called during startup, before the
 *         main function.
 *
 * This version comes in replacement to the default one provided by the Newlib
 * add-ons library.
 * Newlib add-ons' _init_startup only calls init_exceptions, but Newlib add-ons'
 * exception and interrupt vectors are defined in the same section and Newlib
 * add-ons' interrupt vectors are not compatible with the interrupt management
 * of the INTC module.
 * More low-level initializations are besides added here.
 */
int _init_startup(void)
{
  // Import the Exception Vector Base Address.
  extern void _evba;

  // Load the Exception Vector Base Address in the corresponding system register.
  Set_system_register(AVR32_EVBA, (int)&_evba);

  // Enable exceptions.
  Enable_global_exception();

  // Initialize interrupt handling.
  INTC_init_interrupts();

  // Don't-care value for GCC.
  return 1;
}
开发者ID:kerichsen,项目名称:asf,代码行数:28,代码来源:main.c

示例12: Actividad3

void Actividad3(void){
	
pm_switch_to_osc0(&AVR32_PM,FOSC0,OSC0_STARTUP);

Disable_global_interrupt();
//! Structure holding the configuration parameters of the EIC module.
eic_options_t eic_options[2];

// Enable edge-triggered interrupt.
eic_options[0].eic_mode  = EIC_MODE_EDGE_TRIGGERED;
// Interrupt will trigger on falling edge (this is a must-do for the keypad scan
// feature if the chosen mode is edge-triggered).
eic_options[0].eic_edge  = EIC_EDGE_RISING_EDGE;
// Initialize in synchronous mode : interrupt is synchronized to the clock
eic_options[0].eic_async = EIC_SYNCH_MODE;
// Set the interrupt line number.
eic_options[0].eic_line  = QT1081_EIC_EXTINT_INT;


INTC_init_interrupts();
    /* Register the EXTINT1 interrupt handler to the interrupt controller
     */
	INTC_register_interrupt(&touch_button_isr, QT1081_EIC_EXTINT_IRQ, AVR32_INTC_INT0);
 // Init the EIC controller with the options
 eic_init(&AVR32_EIC, eic_options, 1);
 // Enable the EIC lines.
 eic_enable_lines(&AVR32_EIC, (1<<eic_options[0].eic_line));
 // Enable the interrupt for each EIC line.
 eic_enable_interrupt_lines(&AVR32_EIC, (1<<eic_options[0].eic_line));
 
 gpio_enable_module_pin( QT1081_EIC_EXTINT_PIN, QT1081_EIC_EXTINT_FUNCTION);

 Enable_global_interrupt();
 
 while (1){
	 gpio_tgl_gpio_pin(LED0_GPIO);
	 gpio_tgl_gpio_pin(LED1_GPIO);
	 gpio_tgl_gpio_pin(LED2_GPIO);
	 gpio_tgl_gpio_pin(LED3_GPIO);
	 delay_s(100);

 }
 

}
开发者ID:AldricLopez,项目名称:EVK1105,代码行数:45,代码来源:PrimerExamenPractico.c

示例13: _init_startup

/*! \brief Low-level initialization routine called during startup, before the
 *         main function.
 *
 * This version comes in replacement to the default one provided by the Newlib
 * add-ons library.
 * Newlib add-ons' _init_startup only calls init_exceptions, but Newlib add-ons'
 * exception and interrupt vectors are defined in the same section and Newlib
 * add-ons' interrupt vectors are not compatible with the interrupt management
 * of the INTC module.
 * More low-level initializations are besides added here.
 */
int _init_startup(void)
{
  // Import the Exception Vector Base Address.
  extern void _evba;

  // Load the Exception Vector Base Address in the corresponding system register.
  Set_system_register(AVR32_EVBA, (int)&_evba);

  // Enable exceptions.
  Enable_global_exception();

  // Initialize interrupt handling.
  INTC_init_interrupts();

  // Initialize the USART used for the debug trace with the configured parameters.
  set_usart_base( ( void * ) DBG_USART );

  // Don't-care value for GCC.
  return 1;
}
开发者ID:InSoonPark,项目名称:asf,代码行数:31,代码来源:cdc_example.c

示例14: hwInit

/** function to do hardware initialization 
* -> hwInit() is called in main() (src/independent/main.cpp)
*/
void hwInit(){
	// Input and output parameters when initializing PM clocks using pm_configure_clocks().
	// - parameters are defined in params.h and evk1100.h
	pm_freq_param_t clkParams = {
		CPU_CLK, // unsigned long cpu_f;
		PBA_CLK, // unsigned long pba_f; ! PBA frequency (input/output argument).
		FOSC0, // unsigned long osc0_f; ! Oscillator 0's external crystal(or external clock) frequency (board dependant) (input argument).
		OSC0_STARTUP // unsigned long osc0_startup; ! Oscillator 0's external crystal(or external clock) startup time: AVR32_PM_OSCCTRL0_STARTUP_x_RCOSC (input argument).
	};

	pm_configure_clocks(&clkParams);

	Disable_global_interrupt();

	INTC_init_interrupts(); 	// Initialize interrupt vectors.

	uart0.init(115200);
	uart1.init(115200);

	// interrupts will be enabled when loading the context of the first thread (idlethread)
	//Enable_global_interrupt();
}
开发者ID:art1,项目名称:FloatSat-Project-G9,代码行数:25,代码来源:hw_specific.cpp

示例15: init_board

/* \brief Initialize board.
 *
 */
void init_board(void)
{

#ifdef MAX_SPEED
	init_sys_clocks();
#else
  pcl_switch_to_osc(PCL_OSC0, FOSC0, OSC0_STARTUP);
#endif
	INTC_init_interrupts();

	init_dbg_rs232(FPBA_HZ);
	// Activate LED0 & LED1 & LED2 & LED3 pins in GPIO output
	// mode and switch them off.
	gpio_set_gpio_pin(LED0_GPIO);
	gpio_set_gpio_pin(LED1_GPIO);
	gpio_set_gpio_pin(LED2_GPIO);
	gpio_set_gpio_pin(LED3_GPIO);

	et024006_Init(FCPU_HZ, FCPU_HZ);
	gpio_set_gpio_pin(ET024006DHU_BL_PIN);
	et024006_DrawFilledRect(0, 0, ET024006_WIDTH, ET024006_HEIGHT, WHITE);
}
开发者ID:InSoonPark,项目名称:asf,代码行数:25,代码来源:rtouch_example.c


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