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

C++ IOWR函数代码示例

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

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



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

示例1: Hal4D13_GetDataFromChipRam

USHORT Hal4D13_GetDataFromChipRam(void)
{
    USHORT i;
    IOWR(USB_0_BASE,D13_COMMAND_PORT,D13CMD_DEV_RD_RAM);
    i = IORD(USB_0_BASE,D13_DATA_PORT);
    return i;
}
开发者ID:rkj777,项目名称:GestureControlInterfaceCapstone,代码行数:7,代码来源:HAL4D13.c


示例2: Hal4D13_GetDevConfig

USHORT Hal4D13_GetDevConfig(void)
{
  USHORT i; 
  IOWR(USB_0_BASE,D13_COMMAND_PORT,D13CMD_DEV_RD_CNFG);
  i = IORD(USB_0_BASE,D13_DATA_PORT);
  return i;
}
开发者ID:rkj777,项目名称:GestureControlInterfaceCapstone,代码行数:7,代码来源:HAL4D13.c


示例3: Hal4D13_GetDMACounter

USHORT Hal4D13_GetDMACounter(void)
{
    USHORT i;
    IOWR(USB_0_BASE,D13_COMMAND_PORT,D13CMD_DMA_RD_COUNT);
    i = IORD(USB_0_BASE,D13_DATA_PORT);
    return i;
}
开发者ID:rkj777,项目名称:GestureControlInterfaceCapstone,代码行数:7,代码来源:HAL4D13.c


示例4: Hal4D13_ReadChipID

USHORT Hal4D13_ReadChipID(void)
{
    USHORT i;
    IOWR(USB_0_BASE, D13_COMMAND_PORT, D13CMD_DEV_RD_CHIPID);
    i=IORD(USB_0_BASE, D13_DATA_PORT);
    return i;
}
开发者ID:rkj777,项目名称:GestureControlInterfaceCapstone,代码行数:7,代码来源:HAL4D13.c


示例5: Hal4D13_GetEndpointStatusWOInteruptClear

UCHAR Hal4D13_GetEndpointStatusWOInteruptClear(UCHAR bEPIndex)
{
    UCHAR c;
    IOWR(USB_0_BASE,D13_COMMAND_PORT, D13CMD_EP_RDSTS + bEPIndex);
    c = (UCHAR)(IORD(USB_0_BASE,D13_DATA_PORT) &0x0ff);
    return c;
}
开发者ID:rkj777,项目名称:GestureControlInterfaceCapstone,代码行数:7,代码来源:HAL4D13.c


示例6: Hal4D13_GetErrorCode

UCHAR Hal4D13_GetErrorCode(UCHAR bEPIndex)
{
    UCHAR   c;
    IOWR(USB_0_BASE,D13_COMMAND_PORT, D13CMD_EP_RD_ERR+bEPIndex);
    c = (UCHAR)(IORD(USB_0_BASE,D13_DATA_PORT)&0x0ff);
    return c;
}
开发者ID:rkj777,项目名称:GestureControlInterfaceCapstone,代码行数:7,代码来源:HAL4D13.c


示例7: UsbRead

/**
 *
 * This function reads data from the internal registers of the Cypress
 * CY7C67200 USB controller.
 *
 * @param    Address is the address of the register.
 *
 * @return   The data read from the specified address
 *
 * @note     None
 *
 ******************************************************************************/
alt_u16 UsbRead(alt_u16 Address)
{
	//XIo_Out16(HPI_ADDR, Address);
	IOWR(CY7C67200_BASE,HPI_ADDR,Address);
	//usleep(20);
	return IORD(CY7C67200_BASE,HPI_DATA);
}
开发者ID:mantrarush,项目名称:Altera-DE-2,代码行数:19,代码来源:usb.c


示例8: test_sigmoid

/* Tests basic sigmoid functionality */
int test_sigmoid(void){

	float M,time,result;

	alltypes_u input;

	M = 2.24;
	time = 3.8;
	result = 0;

	fprintf(stderr,"Starting sigmoid test....\n");

	fprintf(stderr,"Sigmoid block test register returns [%X].\n", IORD(EULERBLOCK_0_BASE,3));

	fprintf(stderr,"Floats have byte count of [%d].\n",(int)sizeof(float));

	input.fl = M;

	IOWR(EULERBLOCK_0_BASE,0,input.ui);

	/* Check it's corrent */
	input.ui = IORD(EULERBLOCK_0_BASE, 0);


	fprintf(stderr,"Inputs are M=[%4.2f], time=[%4.2f].\n",M,time);

	fprintf(stderr,"IORD returns [%4.8f].\n", input.fl);

	sigmoid(M, time, &result);

	fprintf(stderr,"Sigmoid returned [%4.8f].\n", result);

	return 0;
}
开发者ID:wsheppard,项目名称:ecd2012,代码行数:35,代码来源:sigmoid.c


示例9: Hal4D13_ReadCurrentFrameNumber

USHORT Hal4D13_ReadCurrentFrameNumber(void)
{
    USHORT i;
    IOWR(USB_0_BASE,D13_COMMAND_PORT, D13CMD_RD_FRMNUM);
    i= IORD(USB_0_BASE,D13_DATA_PORT);
    return i;
}
开发者ID:rkj777,项目名称:GestureControlInterfaceCapstone,代码行数:7,代码来源:HAL4D13.c


示例10: Hal4D13_GetEndpointConfig

UCHAR Hal4D13_GetEndpointConfig(UCHAR bEPIndex)
{
    UCHAR   c;
    IOWR(USB_0_BASE,D13_COMMAND_PORT, D13CMD_EP_RD_CNFG+bEPIndex);
    c = (UCHAR)(IORD(USB_0_BASE,D13_DATA_PORT) & 0x0ff);
    return c;
}
开发者ID:rkj777,项目名称:GestureControlInterfaceCapstone,代码行数:7,代码来源:HAL4D13.c


示例11: processCommand

/* Parses user input string and performs relevant method.
 */
void processCommand(char * userInput, int userInputLength)
{
       
    int userParams [50];
    int nParams = 0;
    int error = 0;
    if(userInputLength > 0)
    {
        nParams = getUserParams(userInput, userParams);
        
        if(strncmp(userInput, "help",4) == 0)
            printHelp();

        else if(strncmp(userInput, "wc ", 3) == 0)
            if(nParams == 2)
            {
                IOWR(CONTROL_BASE, userParams[0], userParams[1]);
                printf("%s\n", userInput);
            }
            else
            {
                error = 1;
            }


        else if(strncmp(userInput, "rc ", 3) == 0)
            if(nParams == 1)
            {
                userParams[4] = IORD(CONTROL_BASE, userParams[0]);
                printf("%s: %d  %x\n", userInput, userParams[4], userParams[4]);
            }
            else
                error = 1;

        else if(strncmp(userInput, "restart", 7) == 0)
            restart();
        else if(strncmp(userInput, "pause", 5) == 0)
            pause();

        else if(strncmp(userInput, "set adc", 7) == 0)
        {
            if(nParams == 4)
            {
                setADCParams(userParams[0], userParams[1], userParams[2], userParams[3]);   
            }  
            else
               error = 1;
         
        }
  
        else
        {
            error = 1;
        }
        // Invalid Command
        if(error == 1) printf("%s: Unknown Command. Type 'help' for list of commands.\n", userInput);    
                                       
    }
}
开发者ID:adrianj,项目名称:RangeImaging,代码行数:61,代码来源:PMD19k_Cyclone.c


示例12: Hal4D13_GetIntEnable

ULONG Hal4D13_GetIntEnable(void)
{
    ULONG i;
    IOWR(USB_0_BASE,D13_COMMAND_PORT,D13CMD_DEV_RD_INTEN);
    i = IORD(USB_0_BASE,D13_DATA_PORT);
    i += (((ULONG)IORD(USB_0_BASE,D13_DATA_PORT)) << 16);
    return i;
}
开发者ID:rkj777,项目名称:GestureControlInterfaceCapstone,代码行数:8,代码来源:HAL4D13.c


示例13: init_timer

void init_timer()
{
	ticks = 0;
	
	/* ajastimen keskeytys päälle */
	IOWR(TIMER, TIMER_CONTROL, 1);
	write_irq_mask(1u << TIMER_IRQ);
}
开发者ID:japeq,项目名称:nios-bootloader,代码行数:8,代码来源:timer.c


示例14: pulse_ISR

static void pulse_ISR(void* context, alt_u32 id)
{
   if (IORD(PIO_PULSE_BASE, 0) == 0)
   {
           IOWR(PIO_RESPONSE_BASE, 0, 1);
           flag++;
   }
   //IOWR(PIO_RESPONSE_BASE, 0, 1);
   if (IORD(PIO_PULSE_BASE, 0) == 1)
   {
           IOWR(PIO_RESPONSE_BASE, 0, 0);
           flag++;
   }
   // clear interrupt
   //IOWR(PIO_PULSE_BASE, 0, 0);
   IOWR(PIO_PULSE_BASE, 3, 0x0);
}
开发者ID:eric9913,项目名称:uwaterloo_ece224,代码行数:17,代码来源:lab1_phase2.c


示例15: SD_Ncc

// Send dummy clock pulse
void SD_Ncc()
{
    IOWR(AVSDC_0_BASE, 0, AV_SDC_SEND_DUMMY);
    /*for (int i = 0; i < 8; i++)
    {
        SD_ClockPulse();
    }*/
}
开发者ID:14dannie,项目名称:gbfpga,代码行数:9,代码来源:sdc.c


示例16: main

int main(void) {

	if (init_system() != 0) return(-1);
	
	indexed_file_count = build_file_index(files);
	printf("Indexed files: %d\n", indexed_file_count);
	
	IOWR(BUTTON_PIO_BASE, 2, 0xf);
	IOWR(BUTTON_PIO_BASE, 3, 0x0);
	alt_irq_register( BUTTON_PIO_IRQ, (void*)0, button_ISR );
	
	IOWR(LED_PIO_BASE, 0, 0x00);
	
	player_state = PLAYER_STATE_DEFAULT;	
	
	int length;
	data_file file;
	
	while(1){
		if ((cur_file_index_update == 1) || (player_state_update == 1)) {

			if (cur_file_index_update)
				file = files[cur_file_index];

			switch (player_state){

				case PLAYER_STATE_PLAYING:
					LCD_File_Buffering(file.Name);
					length = 1 + ceil(file.FileSize/(BPB_BytsPerSec*BPB_SecPerClus));
					build_cluster_chain(cluster_chain, length, &file);

					LCD_Display(file.Name, player_mode);
					play(&file, buffer, cluster_chain, player_mode);
					player_state = PLAYER_STATE_USER_INPUT;

				case PLAYER_STATE_USER_INPUT:
					LCD_Display(file.Name, player_mode);
			}

			player_state_update = 0;
			cur_file_index_update = 0;
		}
	}
	
	return(0);
}
开发者ID:evgorchakov,项目名称:MTE-325,代码行数:46,代码来源:player.c


示例17: phy_write

void phy_write(unsigned int reg, unsigned int value)
{ 
  /* set PHY register address into EPAR REG. 0CH */
  dm9000a_iow(0x0C, reg | 0x40); /* PHY register address setting,
			    and DM9000_PHY offset = 0x40 */

  /* fill PHY WRITE data into EPDR REG. 0EH & REG. 0DH */
  dm9000a_iow(0x0E, ((value >> 8) & 0xFF));   /* PHY data high_byte */
  dm9000a_iow(0x0D, value & 0xFF);            /* PHY data low_byte */

  /* issue PHY + WRITE command = 0xa into EPCR REG. 0BH */
  dm9000a_iow(0x0B, 0x8);                     /* clear PHY command first */
  IOWR(DM9000A_INST_BASE, IO_data, 0x0A);  /* issue PHY + WRITE command */
  usleep(STD_DELAY);
  IOWR(DM9000A_INST_BASE, IO_data, 0x08);  /* clear PHY command again */
  usleep(50);  /* wait 1~30 us (>20 us) for PHY + WRITE completion */
}
开发者ID:ECE492W2014G4,项目名称:G4Capstone,代码行数:17,代码来源:dm9000a.c


示例18: timer_ISR

static void timer_ISR(void* context, alt_u32 id)
{
   // acknowledge the interrupt by clearing the TO bit in the status register
   IOWR(TIMER_0_BASE, 0, 0x0);

   // set the flag with a non zero value
   count_flag = 0xf;
}
开发者ID:eric9913,项目名称:ECE224-1,代码行数:8,代码来源:ece224_egm.c


示例19: main

int main()
{
  int i;
  
  unsigned long sw_time_1, sw_time_2;
  
  //enable the temperature sensor
  temp_sensor_init();

  //enable uCProbe communication
  ProbeCom_Init();
  ProbeRS232_Init(0);
  ProbeRS232_RxIntEn();

  // turn off the LEDS
  IOWR(LED_PIO_BASE,0,0xFF);

  printf("BeMicro SDK Lab1: \n");
  printf("-----------------\n\n");

  // Create the input data waveform
  printf("Creating buffer source data\n\n");
  for(i = 0; i < DATA_BUFFER_SIZE; i++)
  {
    source_databuffer[i] = input_data[i%INPUT_LENGTH];
  }

  // record the value of the high resolution time-stamp timer at the entry and exit points of the software filter
  if(alt_timestamp_start() < 0)
  {
    printf("Please add the high resolution timer to the timestamp timer setting in the syslib properties page.\n");
    return 0;
  }

  printf("Software filter is operating (please be patient)\n");
  sw_time_1 = alt_timestamp();
  FIR_SW(source_databuffer,
         DATA_BUFFER_SIZE,
         sw_destination_databuffer,
         T,
         coefficients[0],
         coefficients[1],
         coefficients[2],
         coefficients[3],
         coefficients[4],
         coefficients[5],
         coefficients[6],
         coefficients[7],
         DIVIDER_ORDER);
  sw_time_2 = alt_timestamp();
  printf("Software filter is done\n\n");

  sw_proc_time = ((double)(sw_time_2-sw_time_1))/((double)alt_timestamp_freq());
  printf("Software processing time was: %f seconds\n\n", sw_proc_time);
  printf("Processing time will also be reported by uC-Probe:\n");
  
  return 1;
}
开发者ID:keskella,项目名称:omat,代码行数:58,代码来源:lab1.c


示例20: VPG_Config

void VPG_Config(VPG_MODE Mode, COLOR_TYPE Color) {
#ifndef TX_DISABLED

    //===== check whether vpg function is active
    if (!HDMITX_HPD())
        return;
#ifndef RX_DISABLED
    if (HDMIRX_IsVideoOn())
        return;
#endif //RX_DISABLED    


    OS_PRINTF("===> Pattern Generator Mode: %d (%s)\n", gVpgMode, gszVicText[gVpgMode]);

    //===== updagte vpg mode & color
    IOWR(HDMI_TX_MODE_CHANGE_BASE, 0, 0);
    // change color mode of VPG
    if (gVpgColor == COLOR_RGB444)
        IOWR(HDMI_TX_VPG_COLOR_BASE, 0, VPG_RGB444);  // RGB444
    else if (gVpgColor == COLOR_YUV422)
        IOWR(HDMI_TX_VPG_COLOR_BASE, 0, VPG_YUV422);  // YUV422
    else if (gVpgColor == COLOR_YUV444)
        IOWR(HDMI_TX_VPG_COLOR_BASE, 0, VPG_YUV444);  // YUV444

    IOWR(HDMI_TX_DISP_MODE_BASE, 0, gVpgMode);
    IOWR(HDMI_TX_MODE_CHANGE_BASE, 0, 1);
    IOWR(HDMI_TX_MODE_CHANGE_BASE, 0, 0);
    //
    //HDMITX_EnableVideoOutput();

#endif //#ifndef TX_DISABLED      
}
开发者ID:rcavazza,项目名称:LPVR,代码行数:32,代码来源:hello_world.c



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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