您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ HWREGBITW函数代码示例

51自学网 2021-06-01 21:24:37
  C++
这篇教程C++ HWREGBITW函数代码示例写得很实用,希望能帮到您。

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

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

示例1: SoundCallback

//*****************************************************************************//// The callback function that is called by the sound driver to indicate that// half of the sound buffer has been played.////*****************************************************************************voidSoundCallback(uint32_t ui32Half){    //    // See which half of the sound buffer has been played.    //    if(ui32Half == 0)    {        //        // The first half of the sound buffer needs to be filled.        //        HWREGBITW(&g_ui32Flags, FLAG_PING) = 1;    }    else    {        //        // The second half of the sound buffer needs to be filled.        //        HWREGBITW(&g_ui32Flags, FLAG_PONG) = 1;    }}
开发者ID:PhamVanNhi,项目名称:ECE5770,代码行数:27,


示例2: Delay

//*****************************************************************************//// Delay for a multiple of the system tick clock rate.////*****************************************************************************static voidDelay(unsigned long ulCount){    //    // Loop while there are more clock ticks to wait for.    //    while(ulCount--)    {        //        // Wait until a SysTick interrupt has occurred.        //        while(!HWREGBITW(&g_ulFlags, FLAG_CLOCK_TICK))        {        }        //        // Clear the SysTick interrupt flag.        //        HWREGBITW(&g_ulFlags, FLAG_CLOCK_TICK) = 0;    }}
开发者ID:Razofiter,项目名称:Luminary-Micro-Library,代码行数:26,


示例3: DataReadyIntHandler

void DataReadyIntHandler(void){	uint8_t p = ROM_GPIOPinIntStatus(ADS_DRY_PORT, true) & 0xFF;	MAP_IntDisable(INT_GPIOC);	MAP_GPIOPinIntDisable(ADS_DRY_PORT, ADS_DRY_PIN);	GPIOPinIntClear(ADS_DRY_PORT, p);	HWREGBITW(&g_ulFlags, FLAG_ADS_INT) = 1;}
开发者ID:brians444,项目名称:tiva-ads1246-lwip,代码行数:12,


示例4: OLED_Init

//! Initialize the OLED display.//! /param ulFrequency specifies the SSI Clock Frequency to be used.//OLED初始化void OLED_Init(unsigned long ulFrequency){	unsigned long ulIdx;	//	// Enable the SSI0 and GPIO port blocks as they are needed by this driver.	//	SysCtlPeripheralEnable(SYSCTL_PERIPH_SSI0);	SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOA);	SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIO_OLEDDC);	//	// Configure the SSI0CLK and SSIOTX pins for SSI operation.	//	GPIOPinTypeSSI(GPIO_PORTA_BASE, GPIO_PIN_2 | GPIO_PIN_3 | GPIO_PIN_5);	GPIOPadConfigSet(GPIO_PORTA_BASE, GPIO_PIN_2 | GPIO_PIN_3 | GPIO_PIN_5,					 GPIO_STRENGTH_8MA, GPIO_PIN_TYPE_STD_WPU);	//	// Configure the GPIO port pin used as a D/Cn signal for OLED device,	// and the port pin used to enable power to the OLED panel.	//	GPIOPinTypeGPIOOutput(GPIO_OLEDDC_BASE, GPIO_OLEDDC_PIN | GPIO_OLEDEN_PIN);	GPIOPadConfigSet(GPIO_OLEDDC_BASE, GPIO_OLEDDC_PIN | GPIO_OLEDEN_PIN,					 GPIO_STRENGTH_8MA, GPIO_PIN_TYPE_STD);	GPIOPinWrite(GPIO_OLEDDC_BASE, GPIO_OLEDDC_PIN | GPIO_OLEDEN_PIN,				 GPIO_OLEDDC_PIN | GPIO_OLEDEN_PIN);	HWREGBITW(&g_ulSSIFlags, FLAG_DC_HIGH) = 1;	//	// Configure and enable the SSI0 port for master mode.	//	OLED_Enable(ulFrequency);	//	// Clear the frame buffer.	//	OLED_Clear();	//	// Initialize the SSD1329 controller.  Loop through the initialization	// sequence array, sending each command "string" to the controller.	//	for(ulIdx = 0; ulIdx < sizeof(OLED_INIT_CMD);		ulIdx += OLED_INIT_CMD[ulIdx] + 1)	{		//		// Send this command.		//		RITWriteCommand(OLED_INIT_CMD + ulIdx + 1,						OLED_INIT_CMD[ulIdx] - 1);	}}
开发者ID:mybays,项目名称:lm3s,代码行数:56,


示例5: Delay

//*****************************************************************************//// This function delays for the specified number of milliseconds.////*****************************************************************************static voidDelay(unsigned long ulNumMS){    //    // Loop one time per millisecond.    //    for(; ulNumMS != 0; ulNumMS--)    {        //        // Clear the tick flag.        //        HWREGBITW(&g_ulFlags, FLAG_TICK) = 0;        //        // Wait until the tick flag is set.        //        while(HWREGBITW(&g_ulFlags, FLAG_TICK) == 0)        {        }    }}
开发者ID:yangjunjiao,项目名称:Luminary-Micro-Library,代码行数:26,


示例6: Timer0IntHandler

//*****************************************************************************//// The interrupt handler for the first timer interrupt.////*****************************************************************************voidTimer0IntHandler(void){    //    // Clear the timer interrupt.    //    ROM_TimerIntClear(TIMER0_BASE, TIMER_TIMA_TIMEOUT);    //    // Toggle the flag for the first timer.    //    HWREGBITW(&g_ui32Flags, 0) ^= 1;    //    // Update the interrupt status on the display.    //    ROM_IntMasterDisable();    GrStringDraw(&g_sContext, (HWREGBITW(&g_ui32Flags, 0) ? "1" : "0"), -1, 68,                 26, 1);    ROM_IntMasterEnable();}
开发者ID:PhamVanNhi,项目名称:ECE5770,代码行数:26,


示例7: EventHandler

//****************************************************************************//// Generic event handler for the composite device.////****************************************************************************unsigned longEventHandler(void *pvCBData, unsigned long ulEvent, unsigned long ulMsgData,             void *pvMsgData){    switch(ulEvent)    {        //        // The host has connected to us and configured the device.        //        case USB_EVENT_CONNECTED:        {            //            // Now connected.            //            HWREGBITW(&g_ulFlags, FLAG_CONNECTED) = 1;            break;        }        //        // Handle the disconnect state.        //        case USB_EVENT_DISCONNECTED:        {            //            // No longer connected.            //            HWREGBITW(&g_ulFlags, FLAG_CONNECTED) = 0;            break;        }        default:        {            break;        }    }    return(0);}
开发者ID:joshthornton,项目名称:ENGG4810,代码行数:45,


示例8: EthClientTCPConnect

//*****************************************************************************//// TCP connect//// This function attempts to connect to a TCP endpoint.//// /return None.////*****************************************************************************err_tEthClientTCPConnect(uint32_t ui32Port){    err_t eTCPReturnCode;    //    // Enable the TCP timer function calls.    //    HWREGBITW(&g_sEnet.ui32Flags, FLAG_TIMER_TCP_EN) = 1;    if(g_sEnet.psTCP)    {        //        // Initially clear out all of the TCP callbacks.        //        tcp_sent(g_sEnet.psTCP, NULL);        tcp_recv(g_sEnet.psTCP, NULL);        tcp_err(g_sEnet.psTCP, NULL);        //        // Make sure there is no lingering TCP connection.        //        tcp_close(g_sEnet.psTCP);    }    //    // Create a new TCP socket.    //    g_sEnet.psTCP = tcp_new();    //    // Check if you need to go through a proxy.    //    if(g_sEnet.pcProxyName != 0)    {        //        // Attempt to connect through the proxy server.        //        eTCPReturnCode = tcp_connect(g_sEnet.psTCP, &g_sEnet.sServerIP,                                     ui32Port, TCPConnected);    }    else    {        //        // Attempt to connect to the server directly.        //        eTCPReturnCode = tcp_connect(g_sEnet.psTCP, &g_sEnet.sServerIP,                                     ui32Port, TCPConnected);    }    return(eTCPReturnCode);}
开发者ID:AlexGeControl,项目名称:tiva-c,代码行数:61,


示例9: LimitPositionReverseSet

//*****************************************************************************//// This function sets the position and comparison of the reverse soft limit// switch.////*****************************************************************************voidLimitPositionReverseSet(long lPosition, unsigned long ulLessThan){    //    // Save the positino of the reverse limit switch.    //    g_lLimitReverse = lPosition;    //    // Save the comparison flag.    //    HWREGBITW(&g_ulLimitFlags, LIMIT_FLAG_REV_LT) = ulLessThan ? 1 : 0;}
开发者ID:yangjunjiao,项目名称:Luminary-Micro-Library,代码行数:19,


示例10: LimitPositionForwardSet

//*****************************************************************************//// This function sets the position and comparison of the forward soft limit// switch.////*****************************************************************************voidLimitPositionForwardSet(long lPosition, unsigned long ulLessThan){    //    // Save the position of the forward limit switch.    //    g_lLimitForward = lPosition;    //    // Save the comparison flag.    //    HWREGBITW(&g_ulLimitFlags, LIMIT_FLAG_FWD_LT) = ulLessThan ? 1 : 0;}
开发者ID:yangjunjiao,项目名称:Luminary-Micro-Library,代码行数:19,


示例11: ProcessInterrupt

//*****************************************************************************//// In this particular example, this function merely updates an interrupt// count and sets a flag which tells the main loop to update the display.//// TODO: Update or remove this function as required by your specific// application.////*****************************************************************************voidProcessInterrupt(void){    //    // Update our interrupt counter.    //    g_ui32IntCount++;    //    // Toggle the interrupt flag telling the main loop to update the display.    //    HWREGBITW(&g_ui32Flags, 0) ^= 1;}
开发者ID:peterliu2,项目名称:tivaWare,代码行数:22,


示例12: SysTickHandler

//****************************************************************************//// This is the interrupt handler for the SysTick interrupt.  It is called// periodically and updates a global tick counter then sets a flag to tell the// main loop to move the mouse.////****************************************************************************voidSysTickHandler(void){    //    // Increment the current tick count.    //    g_ulSysTickCount++;    //    // Set a tick event for the mouse device.    //    HWREGBITW(&g_ulFlags, FLAG_MOVE_UPDATE) = 1;}
开发者ID:Razofiter,项目名称:Luminary-Micro-Library,代码行数:20,


示例13: SysTickIntHandler

//*****************************************************************************//// The interrupt handler for the SysTick interrupt.////*****************************************************************************voidSysTickIntHandler(void){    //    // Increment the system tick count.    //    g_ui32TickCounter++;    //    // Indicate that a SysTick interrupt has occurred.    //    HWREGBITW(&g_ui32Flags, FLAG_SYSTICK) = 1;}
开发者ID:rikardonm,项目名称:tivaCCSv6,代码行数:18,


示例14: SysTickIntHandler

//*****************************************************************************//// This function is called by SysTick once every millisecond.////*****************************************************************************voidSysTickIntHandler(void){    unsigned long ulButtons, ulIdx;    //    // Set the flag that indicates that a timer tick has occurred.    //    HWREGBITW(&g_ulFlags, FLAG_TICK) = 1;    //    // Increment the count of ticks.    //    g_ulTickCount++;    //    // Call the CAN periodic tick function.    //    CANTick();    //    // Call the push button periodic tick function.    //    ulButtons = ButtonsTick();    //    // Set the appropriate button press flags if the corresponding button was    // pressed.    //    for(ulIdx = 0;        ulIdx < (sizeof(g_ppulButtonMap) / sizeof(g_ppulButtonMap[0]));        ulIdx++)    {        if(ulButtons & g_ppulButtonMap[ulIdx][0])        {            HWREGBITW(&g_ulFlags, g_ppulButtonMap[ulIdx][1]) = 1;        }    }}
开发者ID:yangjunjiao,项目名称:Luminary-Micro-Library,代码行数:44,


示例15: adcIsr

//adc ISR functionvoid adcIsr(UArg a0) {  // Pop sample from FIFO to allow clearing ADC_IRQ event  singleSample = AUXADCReadFifo();  printf ("ADC: %d/r/n",singleSample);  // Clear ADC_IRQ flag. Note: Missing driver for this.  HWREGBITW(AUX_EVCTL_BASE + AUX_EVCTL_O_EVTOMCUFLAGSCLR, AUX_EVCTL_EVTOMCUFLAGSCLR_ADC_IRQ_BITN) = 1;  // Post semaphore to wakeup task  Semaphore_post(hSem);}
开发者ID:Athul-Asokan-Thulasi,项目名称:unt_ble_project,代码行数:14,


示例16: SoundDisable

//*****************************************************************************////! Disables the sound output.//!//! This function disables the sound output, muting the speaker and cancelling//! any playback that may be in progress.//!//! /return None.////*****************************************************************************voidSoundDisable(void){    //    // Cancel any song or sound effect playback that may be in progress.    //    g_pusMusic = 0;    //    // Indicate that there are no more pending transfers.    //    HWREGBITW(&g_ulDMAFlags, FLAG_TX_PENDING) = 0;}
开发者ID:yangjunjiao,项目名称:Luminary-Micro-Library,代码行数:23,


示例17: MouseHandler

//****************************************************************************//// This function handles notification messages from the mouse device driver.////****************************************************************************unsigned longMouseHandler(void *pvCBData, unsigned long ulEvent,             unsigned long ulMsgData, void *pvMsgData){    switch(ulEvent)    {        //        // The USB host has connected to and configured the device.        //        case USB_EVENT_CONNECTED:        {            g_eMouseState = MOUSE_STATE_IDLE;            HWREGBITW(&g_ulFlags, FLAG_CONNECTED) = 1;            break;        }        //        // The USB host has disconnected from the device.        //        case USB_EVENT_DISCONNECTED:        {            HWREGBITW(&g_ulFlags, FLAG_CONNECTED) = 0;            g_eMouseState = MOUSE_STATE_UNCONFIGURED;            break;        }        //        // A report was sent to the host.  We are not free to send another.        //        case USB_EVENT_TX_COMPLETE:        {            g_eMouseState = MOUSE_STATE_IDLE;            break;        }    }    return(0);}
开发者ID:HackerspaceKRK,项目名称:SW-EK-LM4F120XL,代码行数:44,


示例18: EthClientInit

//*****************************************************************************//// Initialize the Ethernet client//// This function initializes all the Ethernet components to not configured.// This tells the SysTick interrupt which timer modules to call.//// /return None.////*****************************************************************************voidEthClientInit(tEventFunction pfnEvent){    uint32_t ui32User0, ui32User1;    //    // Initialize all the Ethernet components to not configured.  This tells    // the SysTick interrupt which timer modules to call.    //    HWREGBITW(&g_sEnet.ui32Flags, FLAG_TIMER_DHCP_EN) = 0;    HWREGBITW(&g_sEnet.ui32Flags, FLAG_TIMER_DNS_EN) = 0;    HWREGBITW(&g_sEnet.ui32Flags, FLAG_TIMER_TCP_EN) = 0;    g_sEnet.eState = iEthNoConnection;    g_sEnet.pfnEvent = pfnEvent;    //    // Convert the 24/24 split MAC address from NV ram into a 32/16 split MAC    // address needed to program the hardware registers, then program the MAC    // address into the Ethernet Controller registers.    //    FlashUserGet(&ui32User0, &ui32User1);    g_sEnet.pui8MACAddr[0] = ((ui32User0 >> 0) & 0xff);    g_sEnet.pui8MACAddr[1] = ((ui32User0 >> 8) & 0xff);    g_sEnet.pui8MACAddr[2] = ((ui32User0 >> 16) & 0xff);    g_sEnet.pui8MACAddr[3] = ((ui32User1 >> 0) & 0xff);    g_sEnet.pui8MACAddr[4] = ((ui32User1 >> 8) & 0xff);    g_sEnet.pui8MACAddr[5] = ((ui32User1 >> 16) & 0xff);    lwIPInit(g_ui32SysClock, g_sEnet.pui8MACAddr, 0, 0, 0, IPADDR_USE_DHCP);    //    // Start lwIP tick interrupt.    //    HWREGBITW(&g_sEnet.ui32Flags, FLAG_TIMER_DHCP_EN) = 1;}
开发者ID:AlexGeControl,项目名称:tiva-c,代码行数:48,


示例19: AudioCallback

//*****************************************************************************//// This function was the callback function registered with the USB host audio// class driver.  The only two events that are handled at this point are the// USBH_AUDIO_EVENT_OPEN and USBH_AUDIO_EVENT_CLOSE which indicate that a new// audio device has been found or that an existing audio device has been// disconnected.////*****************************************************************************static voidAudioCallback(tUSBHostAudioInstance *psAudioInstance,              uint32_t ui32Event,              uint32_t ui32MsgParam,              void *pvBuffer){    switch(ui32Event)    {        //        // New USB audio device has been enabled.        //        case USBH_AUDIO_EVENT_OPEN:        {            //            // Set the EVENT_OPEN flag and let the main routine handle it.            //            HWREGBITW(&g_sAudioState.ui32EventFlags, EVENT_OPEN) = 1;            break;        }        //        // USB audio device has been removed.        //        case USBH_AUDIO_EVENT_CLOSE:        {            //            // Set the EVENT_CLOSE flag and let the main routine handle it.            //            HWREGBITW(&g_sAudioState.ui32EventFlags, EVENT_CLOSE) = 1;            break;        }        default:        {        }    }}
开发者ID:bli19,项目名称:unesp_mdt,代码行数:47,


示例20: DelayAck

//*****************************************************************************//// This function delays for the specified number of milliseconds, aborting the// delay if the CAN update ACK is received.////*****************************************************************************static unsigned longDelayAck(unsigned long ulNumMS){    //    // Loop one time per millisecond while the CAN update ACK has not been    // received.    //    for(; (ulNumMS != 0) && (g_ulCANUpdateAck == 0); ulNumMS--)    {        //        // Clear the tick flag.        //        HWREGBITW(&g_ulFlags, FLAG_TICK) = 0;        //        // Wait until the tick flag is set or the the CAN update ACK has been        // received.        //        while((HWREGBITW(&g_ulFlags, FLAG_TICK) == 0) &&              (g_ulCANUpdateAck == 0))        {        }        //        // If the CAN update ACK was received, return and indication of that        // fact.        //        if(g_ulCANUpdateAck == 1)        {            return(1);        }    }    //    // The delay completed before the CAN update ACK was received.    //    return(0);}
开发者ID:yangjunjiao,项目名称:Luminary-Micro-Library,代码行数:44,


示例21: UARTIFPStatus

//*****************************************************************************//// Indicates that an enumeration response should be sent for this device.////*****************************************************************************voidUARTIFPStatus(void){    //    // Set the Periodic Status flag.    //    HWREGBITW(&g_ulUARTFlags, UART_FLAG_PSTATUS) = 1;    //    // Generate a fake UART interrupt, during which the enumeration response    // will be sent.    //    HWREG(NVIC_SW_TRIG) = INT_UART0 - 16;}
开发者ID:VENGEL,项目名称:StellarisWare,代码行数:19,


示例22: USBUARTPrimeTransmit

//*****************************************************************************//// Take as many bytes from the transmit buffer as we have space for and move// them into the USB UART's transmit FIFO.////*****************************************************************************static voidUSBUARTPrimeTransmit(uint32_t ui32Base){    uint32_t ui32Read;    uint8_t ui8Char;    //    // If we are currently sending a break condition, don't receive any    // more data. We will resume transmission once the break is turned off.    //    if(HWREGBITW(&g_ui32Flags, FLAG_SENDING_BREAK))    {        return;    }    //    // If there is space in the UART FIFO, try to read some characters    // from the receive buffer to fill it again.    //    while(UARTSpaceAvail(ui32Base))    {        //        // Get a character from the buffer.        //        ui32Read = USBBufferRead((tUSBBuffer *)&g_sRxBuffer, &ui8Char, 1);        //        // Did we get a character?        //        if(ui32Read)        {            //            // Place the character in the UART transmit FIFO.            //            ROM_UARTCharPutNonBlocking(ui32Base, ui8Char);            //            // Update our count of bytes transmitted via the UART.            //            g_ui32UARTTxCount++;        }        else        {            //            // We ran out of characters so exit the function.            //            return;        }    }}
开发者ID:nguyenvuhung,项目名称:TivaWare_C_Series-2.1.2.111,代码行数:56,


示例23: SendBreak

//*****************************************************************************//// This function sets or clears a break condition on the redirected UART RX// line.  A break is started when the function is called with /e bSend set to// /b true and persists until the function is called again with /e bSend set// to /b false.////*****************************************************************************static voidSendBreak(bool bSend){    //    // Are we being asked to start or stop the break condition?    //    if(!bSend)    {        //        // Remove the break condition on the line.        //        ROM_UARTBreakCtl(UART0_BASE, false);        HWREGBITW(&g_ui32Flags, FLAG_SENDING_BREAK) = 0;    }    else    {        //        // Start sending a break condition on the line.        //        ROM_UARTBreakCtl(UART0_BASE, true);        HWREGBITW(&g_ui32Flags, FLAG_SENDING_BREAK) = 1;    }}
开发者ID:nguyenvuhung,项目名称:TivaWare_C_Series-2.1.2.111,代码行数:31,


示例24: UARTIFEnumerate

//*****************************************************************************//// Indicates that an enumeration response should be sent for this device.////*****************************************************************************voidUARTIFEnumerate(void){    //    // Set the enumeration response flag.    //    HWREGBITW(&g_ulUARTFlags, UART_FLAG_ENUM) = 1;    //    // Generate a fake UART interrupt, during which the enumeration response    // will be sent.    //    HWREG(NVIC_SW_TRIG) = INT_UART0 - 16;}
开发者ID:VENGEL,项目名称:StellarisWare,代码行数:19,


示例25: Timer0IntHandler

//*****************************************************************************//// The interrupt handler for the timer interrupt.////*****************************************************************************voidTimer0IntHandler(void){    //    // Clear the timer interrupt.    //    ROM_TimerIntClear(TIMER0_BASE, TIMER_TIMA_TIMEOUT);    //    // Toggle the flag for the timer.    //    HWREGBITW(&g_ulFlags, 0) = 1;    GPIOPinWrite(STP1_BASE, STP1_PLS, STP1_PLS);    SysCtlDelay(SysCtlClockGet() / 500000);    GPIOPinWrite(STP1_BASE, STP1_PLS, 0x00);}
开发者ID:VirtualEnder,项目名称:Stepper,代码行数:21,


示例26: Timer1IntHandler

//*****************************************************************************//// The interrupt handler for the second timer interrupt. (temperature)////*****************************************************************************voidTimer1IntHandler(void){    //    // Clear the timer interrupt.    //    ROM_TimerIntClear(TIMER1_BASE, TIMER_TIMA_TIMEOUT);    //    // Clear ADC interrupt    //    ROM_ADCIntClear(ADC0_BASE, 3);    //Increment Timer A Count    TimerBCount++;    /*//    // Use the flags to Toggle the LED for this timer    //    GPIOPinWrite(GPIO_PORTN_BASE, GPIO_PIN_0, g_ui32Flags);*/    //    // Toggle the flag for the temperature timer.    //    HWREGBITW(&g_ui32InterruptFlags, 0) = 1;    //    // Trigger ADC Conversion    //    ROM_ADCProcessorTrigger(ADC0_BASE, 3);    //    //Wait for ADC conversion to complete    //    while(!ROM_ADCIntStatus(ADC0_BASE, 3, false)) { //Wait for ADC to finish sampling    }	ROM_ADCSequenceDataGet(ADC0_BASE, 3, adc_value); //Get data from Sequencer 3    //    // Update the interrupt status.    //    //ROM_IntMasterDisable();    //UARTprintf("ADC Value = %d/n", adc_value[0]); //Print out the first (and only) value    //ROM_IntMasterEnable();}
开发者ID:keithlueneburg,项目名称:TCES430-projects,代码行数:51,


示例27: SpiderCollide

//*****************************************************************************//// Determines if a given point collides with one of the spiders.  The spider// specified is ignored when doing collision detection in order to prevent a// false collision with itself (when checking to see if it is safe to move the// spider).////*****************************************************************************static int32_tSpiderCollide(int32_t i32Spider, int32_t i32X, int32_t i32Y){    int32_t i32Idx, i32DX, i32DY;    //    // Loop through all the spiders.    //    for(i32Idx = 0; i32Idx < MAX_SPIDERS; i32Idx++)    {        //        // Skip this spider if it is not alive or is the spider that should be        // ignored.        //        if((HWREGBITW(&g_ui32SpiderAlive, i32Idx) == 0) ||           (i32Idx == i32Spider))        {            continue;        }        //        // Compute the horizontal and vertical difference between this spider's        // position and the point in question.        //        i32DX = ((g_pi32SpiderX[i32Idx] > i32X) ?                 (g_pi32SpiderX[i32Idx] - i32X) :                 (i32X - g_pi32SpiderX[i32Idx]));        i32DY = ((g_pi32SpiderY[i32Idx] > i32Y) ?                 (g_pi32SpiderY[i32Idx] - i32Y) :                 (i32Y - g_pi32SpiderY[i32Idx]));        //        // Return this spider index if the point in question collides with it.        //        if((i32DX < SPIDER_WIDTH) && (i32DY < SPIDER_HEIGHT))        {            return(i32Idx);        }    }    //    // No collision was detected.    //    return(-1);}
开发者ID:RoboEvangelist,项目名称:TivaWare_C_Series-2.1.0.12573,代码行数:53,


示例28: OnListenButtonPress

//*****************************************************************************//// Handler for the "LinkListen" button.////*****************************************************************************voidOnListenButtonPress(tWidget *pWidget){    //    // Tell the user we're switching into "LinkFrom" mode.    //    UpdateStatus(true, "Running as listener (LinkListen)");    //    // Set the mode we will be running in.    //    g_ulMode = MODE_LISTENER;    //    // Tell the main loop to go ahead and start communication.    //    HWREGBITW(&g_ulCommandFlags, COMMAND_MODE_SET) = 1;}
开发者ID:Razofiter,项目名称:Luminary-Micro-Library,代码行数:23,


示例29: Cmd_speex

//*****************************************************************************//// Enable the Speex encoder/decoder and allow the quality setting to be set// by a single decimal argument.////*****************************************************************************intCmd_speex(int argc, char *argv[]){    unsigned long ulTemp;    //    // Clear the pass through flag.    //    HWREGBITW(&g_ulFlags, FLAG_BYPASS) = 0;    //    // Check for an argument that is specifying a quality setting.    //    if(argc == 2)    {        //        // Convert the value to a numeric value.        //        ulTemp = ustrtoul(argv[1], 0, 10);        //        // Rail the quality setting at 4.        //        if(ulTemp <= 4)        {            g_iQuality = (int)ulTemp;            //            // Set the quality setting.            //            SpeexEncodeQualitySet(g_iQuality);            UARTprintf("Speex Encoder Quality set to %d/n", g_iQuality);        }        else        {            UARTprintf("Encoder Quality not changed, value must be (1-4)./n");        }    }    return(0);}
开发者ID:Razofiter,项目名称:Luminary-Micro-Library,代码行数:48,


示例30: SpiderCollide

//*****************************************************************************//// Determines if a given point collides with one of the spiders.  The spider// specified is ignored when doing collision detection in order to prevent a// false collision with itself (when checking to see if it is safe to move the// spider).////*****************************************************************************static longSpiderCollide(long lSpider, long lX, long lY){    long lIdx, lDX, lDY;    //    // Loop through all the spiders.    //    for(lIdx = 0; lIdx < MAX_SPIDERS; lIdx++)    {        //        // Skip this spider if it is not alive or is the spider that should be        // ignored.        //        if((HWREGBITW(&g_ulSpiderAlive, lIdx) == 0) || (lIdx == lSpider))        {            continue;        }        //        // Compute the horizontal and vertical difference between this spider's        // position and the point in question.        //        lDX = ((g_plSpiderX[lIdx] > lX) ? (g_plSpiderX[lIdx] - lX) :               (lX - g_plSpiderX[lIdx]));        lDY = ((g_plSpiderY[lIdx] > lY) ? (g_plSpiderY[lIdx] - lY) :               (lY - g_plSpiderY[lIdx]));        //        // Return this spider index if the point in question collides with it.        //        if((lDX < SPIDER_WIDTH) && (lDY < SPIDER_HEIGHT))        {            return(lIdx);        }    }    //    // No collision was detected.    //    return(-1);}
开发者ID:Razofiter,项目名称:Luminary-Micro-Library,代码行数:50,



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


C++ HWSensorsDebugLog函数代码示例
C++ HWREG8函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。