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

C++ port_init函数代码示例

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

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



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


示例16: init_devices1

void init_devices1 (void)
{
	cli(); //Clears the global interrupts
	
	lcd_port_config();  // configure the LCD port
	lcd_set_4bit();
	lcd_init();
	port_init();
	timer5_init();
	sei(); //Enables the global interrupts
}
开发者ID:Devj92,项目名称:test1,代码行数:11,代码来源:PID_test.c


示例17: serial_open_port

gboolean serial_open_port (struct port *p, enum PortUsers user)
{
	/* Open the given serial port */
	
	gchar c[2];
	
	/* 'open' can block in newer linux kernels if the serial device does not
	 * indicate it is ready (e.g. with data carrier detect) and some of the 
	 * devices that we connect to may not do that, so we have to open 
	 * non-blocking here.  We revert to blocking behaviour when the port is 
	 * initialised - see port_init.
	 */
	  
	//if ((p->f = open (p->name, O_RDWR | O_NOCTTY)) == -1)
	if ((p->f = open (p->name, O_RDWR | O_NOCTTY | O_NONBLOCK)) == -1)
		return FALSE;
	p->ref_count++;
	p->user |= user;
	
	/* Save current port settings */
	
	tcgetattr (p->f, &p->old_tio);
	
	/* Initialise the serial port for testing */
	
	port_init (p, PS_TEST);
	
	/* Check to see if port is already in use */
	
	if (read (p->f, c, 1)) {
		c[1] = '\0';
		L_print ("{o}Comms port %s appears to be in use - read '%s' "
													 "from port\n", p->name, c);
	}
	
	/* Initialise the serial port for communications */
	
	port_init (p, PS_READY);
	
	return TRUE;	
}
开发者ID:Jesse-V,项目名称:RLAGS-USU,代码行数:41,代码来源:serial.c


示例18: init_devices

void init_devices(void)
{
 CLI(); //disable all interrupts
 port_init();
 //init_uart();
 init_uart2();

 MCUCR = 0x00;
 GICR  = 0x00;
 TIMSK = 0x00; //timer interrupt sources
 SEI(); //re-enable interrupts
}
开发者ID:blueardour,项目名称:usb-board,代码行数:12,代码来源:main.c


示例19: init_devices

//call this routine to initialize all peripherals
void init_devices(void)
{
 cli();
 port_init();
 spi_init();
 uart_init();

 MCUCR = 0x00;
 GICR  = 0x00;
 TIMSK = 0x00; //timer interrupt sources
 //all peripherals are now initialized
}
开发者ID:nandra,项目名称:AVR,代码行数:13,代码来源:SD_main.c


示例20: main

int main(void)
{

watchdog_init();
clock_init();
port_init();
timer_init();
adc_init();	
__bis_SR_register(LPM0_bits + GIE);

return 0;
}
开发者ID:ashwinashok9111993,项目名称:msp430-code,代码行数:12,代码来源:filter_dac_p2.c



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ port_pin_set_output_level函数代码示例发布时间:2022-05-30
下一篇:
C++ port_create函数代码示例发布时间: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