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


C++ port_init函数代码示例

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


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

示例1: init_devices

void init_devices (void)
{
 cli();         //Clears the global interrupts
 port_init();
 timer1_init();
 adc_init();
 uart0_init();
 sei();         //Enables the global interrupts
}
开发者ID:eyantra,项目名称:eYSIP2014_Communication_Module_Interfacing,代码行数:9,代码来源:master.c

示例2: init_devices

//function to initialize all devices
void init_devices()
	{
	cli(); //Clears the global interrupts
	
	timer1_init();
	port_init();  //Initializes all the ports
	uart0_init(); //Initailize UART1 for serial communication
	//adc_init();
	sei();   //Enables the global interrupts
	}
开发者ID:140070051,项目名称:Hand-Gesture-controlled-Firebird-V,代码行数:11,代码来源:140070050_446.c

示例3: init_devices

/*
* Function For Devices Initialisation
*/
void init_devices (void)
{
 	cli(); ///< Clears the global interrupts
	port_init(); ///< initialise the ports
	adc_init();
	uart0_init();
	timer5_init();
	timer1_init();
	sei();   //Enables the global interrupts
}
开发者ID:eyantra,项目名称:CS684_Automated_Electronic_Toll_Tax_Collection_System_2010,代码行数:13,代码来源:AETC_Robot.c

示例4: port_init

void ADS7843::init()
{
	port_init(); 		//端口初始化
	interrupt_init();  	//中断初始化
	CS_HIGH;					//片选拉高
	SCK_LOW;					//时钟为低
	CS_LOW;             		//片选拉低
	
	isInitialized = true;
}
开发者ID:lenfien,项目名称:LenOS,代码行数:10,代码来源:ads7843.cpp

示例5: init_devices

void init_devices (void)
{
	cli();          //Clears the global interrupts
	port_init();
	adc_init();
	lcd_init();
	timer5_init();
	TIMSK5 = 0x01; //timer5 overflow interrupt enable.
	sei();         //Enables the global interrupts
}
开发者ID:eYSIP-2016,项目名称:Robot_State_Collector,代码行数:10,代码来源:store_in_queue.c

示例6: init

void init()
{
	cli();   //Clears the global interrupts
	port_init();   //Initializes all the ports
	uart0_init();   //Initialize UART0 for serial communication
	left_encoder_interrupt_init();   //Initialize interrupts for left encoder
	right_encoder_interrupt_init();  //Initialize interrupts for right encoder
	timer5_init();   //Initialize TIMER5 for PWM
	sei();   //Enables the global interrupts
}
开发者ID:IshankGulati,项目名称:Caretaker-Robot,代码行数:10,代码来源:Pathfinder.c

示例7: init_devices

void init_devices (void)
{
 cli(); //Clears the global interrupts
 
 //for motion
 port_init();
 
 //for LCD
 port_init();
 adc_init();
 
 //for Xbee
 uart0_init(); //Initailize UART0 for serial communiaction
 uart2_init(); //Initailize UART1 for serial communiaction
 
 sei(); //Enables the global interrupts
 

}
开发者ID:bitsch,项目名称:eyantra-code2014,代码行数:19,代码来源:Wireless+Communication.c

示例8: init_devices

void init_devices (void)
{
    cli(); //Clears the global interrupts
    port_init();
    uart0_init(); //Initailize UART1 for serial communiaction
    adc_init();
    timer5_init();
    timer1_init();
    sei();   //Enables the global interrupts
}
开发者ID:tariqaligithub,项目名称:cs308_2014,代码行数:10,代码来源:White_Line_Following.c

示例9: main

void main() {
  sysclk_init(); // Initialize oscillator
  wait_ms(1000);
  port_init(); // Initialize crossbar and GPIO

  gpib_init();

  timer_init();
  
  EA = 1; // Global Interrupt enable

  usb0_init();

  while (1) {
    gpib_polling();
    usb_polling();

    if(sys_state & SYS_PERIODIC_ACTIVE){
      sys_state &= ~SYS_PERIODIC_ACTIVE;
      led_toggle(1);
    }

    if(sys_state & SYS_GPIB_CONTROLLER){
      led_on(2);
    }else{
      led_off(2);
    }

    { // check talked
      static __xdata u8 persistent = 0;
      if(sys_state & SYS_GPIB_TALKED){
        led_on(3);
        persistent = 0x40;
      }else if(persistent > 0){
        led_toggle(3);
        persistent--;
      }else{
        led_off(3);
      }
    }

    { // check listened
      static __xdata u8 persistent = 0;
      if(sys_state & SYS_GPIB_LISTENED){
        led_on(4);
        persistent = 0x40;
      }else if(persistent > 0){
        led_toggle(4);
        persistent--;
      }else{
        led_off(4);
      }
    }
  }
}
开发者ID:fenrir-naru,项目名称:gpib-usbcdc,代码行数:55,代码来源:main.c

示例10: init_devices

void init_devices (void)
{
 cli(); //Clears the global interrupts
 timer1_init();
 port_init();
 adc_init();
 timer5_init();
 left_position_encoder_interrupt_init();
 right_position_encoder_interrupt_init();
 sei(); //Enables the global interrupts
}
开发者ID:Xalos,项目名称:Pick-placer,代码行数:11,代码来源:def.c

示例11: init_devices

//Function to initialize all the peripherals
void init_devices(void)
{
	cli(); //disable all interrupts
	port_init();
	timer1_init();
	adc_init();
	uart0_init(); 
//	left_position_encoder_interrupt_init();
// 	right_position_encoder_interrupt_init();
	sei(); //re-enable interrupts 
}
开发者ID:eyantra,项目名称:CS684_Collaborative_cleaning_project_2010,代码行数:12,代码来源:rotate.c

示例12: ov7725_eagle_get_img

/*!
 *  @brief      鹰眼ov7725采集图像(采集到的数据存储在 初始化时配置的地址上)
 *  @since      v5.0
 */
void ov7725_eagle_get_img()
{
    ov7725_eagle_img_flag = IMG_START;                   //开始采集图像
    port_init(PTD14, ALT1 | IRQ_FALLING | PULLUP );          //初始化 PTD7 管脚,复用功能为GPIO ,下降沿触发中断,上拉电阻
    PORTD_ISFR  |= 0x4000;
    enable_irq(PORTD_IRQn);                         //允许PTA的中断
    while(ov7725_eagle_img_flag != IMG_FINISH)           //等待图像采集完毕
    {
        if(ov7725_eagle_img_flag == IMG_FAIL)            //假如图像采集错误,则重新开始采集
        {
            ov7725_eagle_img_flag = IMG_START;           //开始采集图像
            PORTA_ISFR = ~0;                //写1清中断标志位(必须的,不然回导致一开中断就马上触发中断)
            //enable_irq(PORTD_IRQn);                 //允许PTA的中断
        }
    }
    port_init(PTD13, ALT1 | PULLUP );         //PCLK

    port_init(PTD14, ALT1 | PULLDOWN );     //场中断,上拉,上降沿触发中断,带滤波

}
开发者ID:chenxuuu,项目名称:SmartCar,代码行数:24,代码来源:VCAN_OV7725_Eagle.c

示例13: parse4port

// порт
cli_result_t parse4port ( void *Port, int argc, char **argv )
{
    const char *PortCfg[ 5 ];
    #define File ( PortCfg[ 0 ] )
    #define Parity ( PortCfg[ 1 ] )
    #define Speed ( PortCfg[ 2 ] )
    #define DBits ( PortCfg[ 3 ] )
    #define SBits ( PortCfg[ 4 ] )
    
    // настроить порт
    cli_arg_t JournalArgs[] = 
    {
        { "port_file", 0, CLI_OPTIONAL_ARG, CLI_REQUIRED_VAL, __parse4port_strp, &File },
        { "port_parity", 0, CLI_OPTIONAL_ARG, CLI_REQUIRED_VAL, __parse4port_strp, &Parity },
        { "port_speed", 0, CLI_OPTIONAL_ARG, CLI_REQUIRED_VAL, __parse4port_strp, &Speed },
        { "port_sbits", 0, CLI_OPTIONAL_ARG, CLI_REQUIRED_VAL, __parse4port_strp, &DBits },
        { "port_dbits", 0, CLI_OPTIONAL_ARG, CLI_REQUIRED_VAL, __parse4port_strp, &SBits },
        CLI_LAST_ARG
    };
    
    cli_result_t Result = cli_parse ( JournalArgs, argc, argv );
    if ( Result != CLI_SUCCESS )
    {
        return Result;
    }
    
    if ( rs232_init ( ( *( askue_port_t** ) Port )->RS232, &( ( *( askue_port_t** ) Port )->Termios ) ) )
    {
        return CLI_ERROR_HANDLER;
    }
    
    rs232_set_speed ( &( ( *( askue_port_t** ) Port )->Termios ), Speed );
    rs232_set_databits ( &( ( *( askue_port_t** ) Port )->Termios ), DBits );
    rs232_set_stopbits ( &( ( *( askue_port_t** ) Port )->Termios ), SBits );
    rs232_set_parity ( &( ( *( askue_port_t** ) Port )->Termios ), Parity );
    
    if ( rs232_apply ( ( *( askue_port_t** ) Port )->RS232, &( ( *( askue_port_t** ) Port )->Termios ) ) )
    {
        return CLI_ERROR_HANDLER;
    }
    
    if ( port_init ( *( askue_port_t** ) Port, File, Speed, DBits, SBits, Parity ) == -1 )
    {
        return CLI_ERROR_HANDLER;
    }

    return Result;
    
    #undef File
    #undef Parity
    #undef Speed
    #undef DBits
    #undef SBits
}
开发者ID:axard-midday,项目名称:askue-all,代码行数:55,代码来源:script_arg.c

示例14: memport_init

static void memport_init( muse_env *env, void *ptr, muse_cell args )
{
	memport_t *p = (memport_t*)ptr;

	p->base.mode |= MUSE_PORT_READ_WRITE;

	port_init( env, (muse_port_base_t*)p );
	
	p->first = p->last = NULL;
	p->read_offset = 0;
}
开发者ID:jbulow,项目名称:mse,代码行数:11,代码来源:muse_builtin_memport.c

示例15: init_devices

void init_devices (void)
{
 cli(); //Clears the global interrupts
 port_init();
 adc_init(); 
 lcd_init();
 lcd_set_4bit();
 
// timer1_init();
 sei(); //Enables the global interrupts
}
开发者ID:meetshah1995,项目名称:EE-324,代码行数:11,代码来源:final_3.c


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