本文整理汇总了C++中HWREGBITW函数的典型用法代码示例。如果您正苦于以下问题:C++ HWREGBITW函数的具体用法?C++ HWREGBITW怎么用?C++ HWREGBITW使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了HWREGBITW函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: SoundCallback
//*****************************************************************************
//
// The callback function that is called by the sound driver to indicate that
// half of the sound buffer has been played.
//
//*****************************************************************************
void
SoundCallback(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,代码来源:synth.c
示例2: Delay
//*****************************************************************************
//
// Delay for a multiple of the system tick clock rate.
//
//*****************************************************************************
static void
Delay(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,代码来源:qs_ek-lm3s8962.c
示例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,代码来源:main.c
示例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,代码来源:oled.c
示例5: Delay
//*****************************************************************************
//
// This function delays for the specified number of milliseconds.
//
//*****************************************************************************
static void
Delay(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,代码来源:update.c
示例6: Timer0IntHandler
//*****************************************************************************
//
// The interrupt handler for the first timer interrupt.
//
//*****************************************************************************
void
Timer0IntHandler(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,代码来源:timers.c
示例7: EventHandler
//****************************************************************************
//
// Generic event handler for the composite device.
//
//****************************************************************************
unsigned long
EventHandler(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,代码来源:usbdsdcard.c
示例8: EthClientTCPConnect
//*****************************************************************************
//
// TCP connect
//
// This function attempts to connect to a TCP endpoint.
//
// \return None.
//
//*****************************************************************************
err_t
EthClientTCPConnect(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,代码来源:eth_client.c
示例9: LimitPositionReverseSet
//*****************************************************************************
//
// This function sets the position and comparison of the reverse soft limit
// switch.
//
//*****************************************************************************
void
LimitPositionReverseSet(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,代码来源:limit.c
示例10: LimitPositionForwardSet
//*****************************************************************************
//
// This function sets the position and comparison of the forward soft limit
// switch.
//
//*****************************************************************************
void
LimitPositionForwardSet(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,代码来源:limit.c
示例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.
//
//*****************************************************************************
void
ProcessInterrupt(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,代码来源:edge_count.c
示例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.
//
//****************************************************************************
void
SysTickHandler(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,代码来源:usb_dev_chidcdc.c
示例13: SysTickIntHandler
//*****************************************************************************
//
// The interrupt handler for the SysTick interrupt.
//
//*****************************************************************************
void
SysTickIntHandler(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,代码来源:enet_uip.c
示例14: SysTickIntHandler
//*****************************************************************************
//
// This function is called by SysTick once every millisecond.
//
//*****************************************************************************
void
SysTickIntHandler(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,代码来源:bdc-ui.c
示例15: adcIsr
//adc ISR function
void 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,代码来源:main.c
示例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.
//
//*****************************************************************************
void
SoundDisable(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,代码来源:sound.c
示例17: MouseHandler
//****************************************************************************
//
// This function handles notification messages from the mouse device driver.
//
//****************************************************************************
unsigned long
MouseHandler(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,代码来源:usb_dev_mouse.c
示例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.
//
//*****************************************************************************
void
EthClientInit(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,代码来源:eth_client.c
示例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 void
AudioCallback(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,代码来源:usb_sound.c
示例20: DelayAck
//*****************************************************************************
//
// This function delays for the specified number of milliseconds, aborting the
// delay if the CAN update ACK is received.
//
//*****************************************************************************
static unsigned long
DelayAck(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,代码来源:update.c
注:本文中的HWREGBITW函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论