本文整理汇总了C++中IOWR函数的典型用法代码示例。如果您正苦于以下问题:C++ IOWR函数的具体用法?C++ IOWR怎么用?C++ IOWR使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了IOWR函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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);
}
示例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;
}
示例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;
}
示例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;
}
示例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);
}
}
示例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;
}
示例13: init_timer
void init_timer()
{
ticks = 0;
/* ajastimen keskeytys päälle */
IOWR(TIMER, TIMER_CONTROL, 1);
write_irq_mask(1u << TIMER_IRQ);
}
示例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);
}
示例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();
}*/
}