这篇教程C++ xASSERT函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中xASSERT函数的典型用法代码示例。如果您正苦于以下问题:C++ xASSERT函数的具体用法?C++ xASSERT怎么用?C++ xASSERT使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了xASSERT函数的30个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: PDMACurrentDestAddrGet//*****************************************************************************////! /brief Get the PDMA Current Destination Address of a channel.//!//! /param ulChannelID is the channel ID that have been disabled.//! /param ulIntFlags is the interrupt type of PDMA.//! The channel ID can be://! - PDMA_CHANNEL_0//! - PDMA_CHANNEL_1//! - others refrence /ref NUC1xx_PDMA_Channel_IDs//! .//!//! /return None.////*****************************************************************************unsigned long PDMACurrentDestAddrGet(unsigned long ulChannelID){ // // Check the arguments. // xASSERT(xDMAChannelIDValid(ulChannelID)); return xHWREG(g_psDMAChannelAddress[ulChannelID] + PDMA_CDAR);}
开发者ID:qhz,项目名称:cox,代码行数:25,
示例2: GPIODirModeGet//*****************************************************************************////! Gets the direction and mode of a pin.//!//! /param ulPort is the base address of the GPIO port.//! /param ulBit is the pin number.//!//! This function gets the direction and control mode for a specified pin on//! the selected GPIO port. The pin can be configured as either an input or//! output under software control, or it can be under hardware control. The//! type of control and direction are returned as an enumerated data type.//!//! /return Returns one of the enumerated data types described for//! GPIODirModeSet().////*****************************************************************************unsigned longGPIODirModeGet(unsigned long ulPort, unsigned long ulBit){ // // Check the arguments. // xASSERT(GPIOBaseValid(ulPort)); xASSERT(ulBit < 16); // // Return the pin direction and mode. // if(ulBit < 8) { return((xHWREG(ulPort + GPIO_CRL) & (0xF << (ulBit * 4))) >> (ulBit * 4)); } else { return((xHWREG(ulPort + GPIO_CRH) &
开发者ID:Azz1,项目名称:RPI_EPI,代码行数:36,
示例3: SPLC780Write//*****************************************************************************////! /brief Write data or command to the SPLC780D.//!//! /param ucRS determines if the IR or DR to select.//!//! The parameter of ucRS can be://! - /ref SPLC780_RS_COMMAND - select the IR.//! - /ref SPLC780_RS_DATA - select the DR.//!//! /return None.////*****************************************************************************void SPLC780Write(unsigned char ucRS, unsigned char ucInstruction){ // // Check Arguments. // xASSERT((ucRS == SPLC780_RS_COMMAND) || (ucRS == SPLC780_RS_DATA)); SPLC780Write4Bit((ucInstruction & 0xf0) | ucRS); SPLC780Write4Bit(((ucInstruction << 4) & 0xf0) | ucRS);}
开发者ID:AlexGora,项目名称:cox,代码行数:24,
示例4: AT45DB161_Init//*****************************************************************************////! /brief Initialize AT45DB161 and SPI//!//! /param ulSpiClock specifies the SPI Clock Rate//!//! This function initialize the mcu SPI as master and specified SPI port.//! After SPI and port was configured, the mcu send a AT45DB161_CMD_SRRD command//! to get the page size of AT45DB161 to get prepareed for the followed read and//! write operations.//!//! /return None.////*****************************************************************************void AT45DB161_Init(unsigned long ulSpiClock){ unsigned char tmp; xASSERT((ulSpiClock > 0) && (ulSpiClock < AT45DB161_MAX_CLK)); xSysCtlPeripheralEnable(xGPIOSPinToPeripheralId(AT45DB161_SCK)); xSysCtlPeripheralEnable(xGPIOSPinToPeripheralId(AT45DB161_CS_PIN)); xSysCtlPeripheralEnable(xGPIOSPinToPeripheralId(AT45DB161_MISO)); xSysCtlPeripheralEnable(xGPIOSPinToPeripheralId(AT45DB161_MOSI)); xSysCtlPeripheralEnable2(AT45DB161_SPI_PORT); xSysCtlPeripheralEnable(SYSCTL_PERIPH_AFIO); xGPIOSPinDirModeSet(AT45DB161_CS_PIN, xGPIO_DIR_MODE_OUT);#if (AT45DB161_WRITE_PROTECT < 1) xGPIOSPinDirModeSet(FLASH_PIN_WRITE_PROTECT, xGPIO_DIR_MODE_OUT); xGPIOSPinWrite(FLASH_PIN_WRITE_PROTECT, 0);#endif // // PD1 as SPI2.CLK // xSPinTypeSPI(SPI_CLK, AT45DB161_SCK); // // PD2 as SPI2.MISO // MISO20 => SPI0MISO // xSPinTypeSPI(SPI_MISO, AT45DB161_MISO); // // PD3 as SPI2.MOSI // MOSI20 => SPI0MISO // xSPinTypeSPI(SPI_MOSI, AT45DB161_MOSI); //xSysCtlPeripheralEnable(SYSCTL_PERIPH_AFIO); // //! Set SPI mode. // xSPIConfigSet(AT45DB161_SPI_PORT, ulSpiClock, SPI_MODE_MASTER | SPI_MSB_FIRST | SPI_2LINE_FULL | SPI_DATA_WIDTH8 | SPI_FORMAT_MODE_4); SPISSModeConfig(AT45DB161_SPI_PORT, SPI_CR1_SSM); SPISSIConfig(AT45DB161_SPI_PORT, SPI_CR1_SSI); SPIEnble(AT45DB161_SPI_PORT); AT45DB161_CS = 1; xSPISingleDataReadWrite(AT45DB161_SPI_PORT, 0xFF); xSysCtlDelay(100000); AT45DB161_CS = 0; // //! Read AT45DB161 state register to get the page size. // xSPISingleDataReadWrite(AT45DB161_SPI_PORT, AT45DB161_CMD_SRRD); tmp = xSPISingleDataReadWrite(AT45DB161_SPI_PORT, 0xFF); if(tmp & AT45DB161_PGSZ) AT45DB161_PageSize = 512; AT45DB161_CS = 1;}
开发者ID:AlexGora,项目名称:cox,代码行数:68,
示例5: IWDGTimerInit//*****************************************************************************////! /brief Configurate The Independent WatchDog's Timer Interval.//!//! /param ulConfig is the Timer Interval Selection.//!//! This function is to Configurate The Independent WatchDog's Timer Interval.//!//! /return None.////*****************************************************************************voidIWDGTimerInit(unsigned long ulConfig){ // // Check the arguments. // xASSERT((ulConfig <= IWDG_RLR_RL_M)); xHWREG(IWDG_KR) = IWDG_KR_PROTECT_DIS; xHWREG(IWDG_RLR) = ulConfig;}
开发者ID:sangwook236,项目名称:general-development-and-testing,代码行数:22,
示例6: WDTimerWindowValueSet//*****************************************************************************////! /brief Set The WatchDog Timer(WDT)'s Window Value.//!//! /param ulConfig is the Timer Window Value Selection.//!//! This function is to set The WatchDog Timer(WDT)'s Wondow Value.//!//! /return None.////*****************************************************************************voidWDTimerWindowValueSet(unsigned long ulConfig){ // // Check the arguments. // xASSERT((ulConfig <= WWDG_CFR_W_M)); xHWREG(WWDG_CFR) &= ~WWDG_CFR_W_M; xHWREG(WWDG_CFR) |= ulConfig;}
开发者ID:sangwook236,项目名称:general-development-and-testing,代码行数:22,
示例7: ACMPIntEnable//*****************************************************************************////! /brief Enable the comparator interrupt.//!//! /param ulBase is the base address of the comparator module.//! /param ulComp is the index(0 - 1) of the comparator.//!//! This function enables generation of an interrupt from the specified//! comparator. Only comparators whose interrupts are enabled can be reflected//! to the processor.//!//! /note In KL25Z Series, the ulComp must be 0.//!//! /return None.////*****************************************************************************voidACMPIntEnable(unsigned long ulBase, unsigned long ulCompID) { unsigned long ulCRAddr; xASSERT(ulBase == ACMP_BASE); xASSERT((ulCompID >= 0) && (ulCompID < 2)); // // Get the corresponding CR register address // ulCRAddr = ulBase + CMP0_SCR + (4 * ulCompID); // // Enable the comparator interrupt // xHWREGB(ulCRAddr) |= CMP0_SCR_IEF; xHWREGB(ulCRAddr) |= CMP0_SCR_IER;}
开发者ID:0xc0170,项目名称:cox,代码行数:36,
示例8: ST7735DrawVerticalLine//*****************************************************************************////! /brief Draws a vertical line.//!//! /param ulX is the X coordinate of the line.//! /param ulStartY is the Y coordinate of the start of the line.//! /param ulEndY is the Y coordinate of the end of the line.//! /param ulColor is the color of the line.//!//! This function draws a vertical line on the display. The coordinates of the//! line are assumed to be within the extents of the display.//!//! /return None.////*****************************************************************************voidST7735DrawVerticalLine(unsigned short usX, unsigned short usStartY, unsigned short usEndY, unsigned long ulColor){ xASSERT((usStartY <= usEndY) && (usEndY <= LCD_VERTICAL_MAX) && (usStartY >= 0)); while(usStartY++ <= usEndY) { ST7735DrawOnePixel(usX, usStartY, ulColor); }}
开发者ID:AlexGora,项目名称:cox,代码行数:26,
示例9: xADCIntCallbackInit//*****************************************************************************////! /brief Init the ADC Interrupt Callback function.//!//! /param ulBase is the base address of the ADC.//! /param pfnCallback is the callback function.//!//! When there is any ADC intrrupt occrus, Interrupt Handler will //! call the callback function. //! //! param of pfnCallback//! - pvCBData not used, always 0.//! - ulEvent is the interrupt event..//! - ulMsgParam not used, always 0.//! - pvMsgData not used, always 0.//! .//!//! /return None.////*****************************************************************************void xADCIntCallbackInit(unsigned long ulBase, xtEventCallback pfnCallback){ // // Check the arguments. // xASSERT(ulBase == xADC0_BASE); g_pfnADCHandlerCallbacks[0] = pfnCallback;}
开发者ID:0xc0170,项目名称:cox,代码行数:31,
示例10: ST7735DrawHorizontalLine//*****************************************************************************////! /brief Draws a horizontal line.//!//! /param usStartX is the X coordinate of the start of the line.//! /param usEndX is the X coordinate of the end of the line.//! /param usY is the Y coordinate of the line.//! /param usColor is the color of the line.//!//! This function draws a horizontal line on the display. The coordinates of//! the line are assumed to be within the extents of the display.//!//! /return None.////*****************************************************************************voidST7735DrawHorizontalLine(unsigned short usStartX, unsigned short usEndX, unsigned short usY, unsigned long ulColor){ xASSERT((usStartX <= usEndX) && (usEndX <= LCD_HORIZONTAL_MAX) && (usStartX >= 0)); while(usStartX++ <= usEndX) { ST7735DrawOnePixel(usStartX, usY, ulColor); }}
开发者ID:AlexGora,项目名称:cox,代码行数:26,
示例11: DMAChannelIntFlagClear//*****************************************************************************////! /brief Clear the DMA interrupt flag of a channel.//!//! /param ulChannelID is the channel ID that have been disabled.//! /param ulIntFlags is the interrupt type of DMA.//! The channel ID can be://! - DMA1_CHANNEL_1//! - DMA1_CHANNEL_2//! - others refrence /ref STM32F1xx_DMA_Channel_IDs//! .//! The interrupt type can be://! - DMA_INT_TC//! - DMA_INT_ERROR//! - refrence /ref STM32F1xx_DMA_INT_Type//! .//!//! /return the Status of The DMA interrupt.////*****************************************************************************void DMAChannelIntFlagClear(unsigned long ulChannelID, unsigned long ulIntFlags){ // // Check the arguments. // xASSERT(xDMAChannelIDValid(ulChannelID)); xASSERT(((ulIntFlags & DMA_INT_TC) == DMA_INT_TC) || ((ulIntFlags & DMA_INT_HT) == DMA_INT_HT) || ((ulIntFlags & DMA_INT_ERROR) == DMA_INT_ERROR)); if((ulChannelID) < 7) { xHWREG(DMA1_BASE + DMA_IFCR) |= (ulIntFlags << ulChannelID*4); } else { xHWREG(DMA2_BASE + DMA_IFCR) |= (ulIntFlags << (ulChannelID-1024)*4); }}
开发者ID:Limius,项目名称:cox,代码行数:40,
示例12: PDMAChannelIsBusy//*****************************************************************************////! /brief Get the PDMA of a channel busy or not.//!//! /param ulChannelID is the channel ID that have been disabled.//! The channel ID can be://! - PDMA_CHANNEL_0//! - PDMA_CHANNEL_1//! - others refrence /ref NUC1xx_PDMA_Channel_IDs//! .//!//! /return returns xtrue if PDMA channel is busy or returns xfalse.////*****************************************************************************xtBoolean PDMAChannelIsBusy(unsigned long ulChannelID){ // // Check the arguments. // xASSERT(xDMAChannelIDValid(ulChannelID)); return ((xHWREG(g_psDMAChannelAddress[ulChannelID] + PDMA_CSR) | PDMA_CSR_TEN) ? xtrue : xfalse);}
开发者ID:Karplyak,项目名称:cox,代码行数:25,
示例13: GPIODirModeSet//*****************************************************************************////! /brief Sets the direction and pad configuration of the specified pin.//!//! /param ulPort is the base address of the GPIO port//! /param ulBit is the bit number of a port.//! /param ulPinType is the pin direction and/or pad configuration.//! /param ulPinSpeed is input or output speed of specified pin.//!//! This function will set the specified pin(Only 1 pin) on the selected GPIO//! port as either an input or output under software control, or it will set//! the pin to be under hardware control.//!//! The parameter /e ulPinType is an enumerated data type that can be one of//! the following values://!//! - /b GPIO_TYPE_IN_ANALOG//! - /b GPIO_TYPE_IN_FLOATING//! - /b GPIO_TYPE_IN_WPU_WPD//! - /b GPIO_TYPE_OUT_STD//! - /b GPIO_TYPE_OUT_OD//! - /b GPIO_TYPE_AFOUT_STD//! - /b GPIO_TYPE_AFOUT_OD//!//! The parameter /e ulPinSpeed is an enumerated data type that can be one of//! the following values://!//! - /b GPIO_IN_SPEED_FIXED//! - /b GPIO_OUT_SPEED_10M//! - /b GPIO_OUT_SPEED_2M//! - /b GPIO_OUT_SPEED_50M//!//!//! /return None.////*****************************************************************************voidGPIODirModeSet(unsigned long ulPort, unsigned long ulBit, unsigned long ulPinType, unsigned long ulPinSpeed){ // // Check the arguments. // xASSERT(GPIOBaseValid(ulPort)); xASSERT(ulBit < 16); xASSERT((ulPinType == GPIO_TYPE_IN_ANALOG) || (ulPinType == GPIO_TYPE_IN_FLOATING) || (ulPinType == GPIO_TYPE_IN_WPU_WPD) || (ulPinType == GPIO_TYPE_OUT_STD) || (ulPinType == GPIO_TYPE_OUT_OD) || (ulPinType == GPIO_TYPE_AFOUT_STD) || (ulPinType == GPIO_TYPE_AFOUT_OD)); xASSERT((ulPinSpeed == GPIO_IN_SPEED_FIXED) || (ulPinSpeed == GPIO_OUT_SPEED_10M) || (ulPinSpeed == GPIO_OUT_SPEED_2M) || (ulPinSpeed == GPIO_OUT_SPEED_50M)); // // Set the pin direction and mode. // if(ulBit < 8) { xHWREG(ulPort + GPIO_CRL) &= (~((GPIO_CRL_MODE0_M | GPIO_CRL_CNF0_M) << (ulBit * 4))); xHWREG(ulPort + GPIO_CRL) = (xHWREG(ulPort + GPIO_CRL) | / (((ulPinSpeed | ulPinType)) << (ulBit * 4))); } else { xHWREG(ulPort + GPIO_CRH) &= (~((GPIO_CRH_MODE8_M | GPIO_CRH_CNF8_M) << ((ulBit -8) * 4))); xHWREG(ulPort + GPIO_CRH) = (xHWREG(ulPort + GPIO_CRH) | / (((ulPinSpeed | ulPinType)) << ((ulBit -8) * 4))); }}
开发者ID:Azz1,项目名称:RPI_EPI,代码行数:77,
示例14: xACMPConfigure//*****************************************************************************////! /brief Select the ACMP- input source of the comparator.//!//! /param ulBase is the base address of the comparator module.//! /param ulComp is the index(0 - 1) of the comparator to configure.//! /param ulSource is the source of Comp- input. //! Refrence /ref NUC1xx_ACMP_Analog_Src_negative.//!//! This function configures the Comp- input source of a comparator. //!//! /return None.////*****************************************************************************voidxACMPConfigure(unsigned long ulBase, unsigned long ulComp, unsigned long ulSource){ unsigned long ulCRAddr; xASSERT(ulBase == ACMP_BASE); xASSERT((ulComp >= 0) && (ulComp < 2)); xASSERT((ulSource == ACMP_ASRCN_PIN) || (ulSource == ACMP_ASRCN_REF)); // // Get the corresponding CR register address // ulCRAddr = ulBase + ACMP_CR0 + (4 * ulComp); // // Set the comp- input source // xHWREG(ulCRAddr) &= ~ACMP_CR_CN; xHWREG(ulCRAddr) |= ulSource;}
开发者ID:Karplyak,项目名称:cox,代码行数:35,
示例15: HD44780Read//*****************************************************************************////! /brief Read the state or data from the HD44780.//!//! /param ucRS determines if the IR or DR to select.//!//! The parameter of ucRS can be://! - HD44780_RS_COMMAND - select the IR.//! - HD44780_RS_DATA - select the DR.//!//! /return None.////*****************************************************************************unsigned char HD44780Read(unsigned char ucRS){ unsigned char ucData = 0; // // Check Arguments. // xASSERT((ucRS == HD44780_RS_COMMAND) || (ucRS == HD44780_RS_DATA)); return ucData;}
开发者ID:AlexGora,项目名称:cox,代码行数:25,
示例16: WDTimerInit//*****************************************************************************////! /brief Configurate The WatchDog Timer(WDT)'s Timer Interval.//!//! /param ulConfig is the Timer Interval Selection.//!//! This function is to Configurate The WatchDog Timer(WDT)'s Timer Interval.//!//! /return None.////*****************************************************************************voidWDTimerInit(unsigned long ulConfig){ // // Check the arguments. // xASSERT((ulConfig >= 0x40) && (ulConfig <= WWDG_CR_CT_M)); xHWREG(WWDG_CR) &= ~WWDG_CR_CT_M; xHWREG(WWDG_CR) |= ulConfig;}
开发者ID:sangwook236,项目名称:general-development-and-testing,代码行数:23,
示例17: ST7735SetCurPos//*****************************************************************************////! /brief Set the cursor location.//!//! /param ulStartX is the character index.//! /param ulEndX is the line number.//!//! The default location is (0,0). After set the location, the strings will//! display at the (ulCol, ulRow).//!//! /return None.////*****************************************************************************voidST7735SetCurPos(unsigned long ulStartX, unsigned long ulEndX, unsigned long ulStartY, unsigned long ulEndY){ // // Check Arguments. // xASSERT((ulStartX < ulEndX) && (ulStartY < ulEndY)); xASSERT((ulEndX < LCD_HORIZONTAL_MAX) && (ulEndY < LCD_VERTICAL_MAX)); // // Tell the controller we are about to write data into its RAM. // ST7735WriteCmd(ST7735_CASET_REG); ST7735WriteData(ulStartX); ST7735WriteData(ulEndX); ST7735WriteCmd(ST7735_RASET_REG); ST7735WriteData(ulStartY); ST7735WriteData(ulEndY); ST7735WriteCmd(ST7735_RAMWR_REG);}
开发者ID:AlexGora,项目名称:cox,代码行数:34,
示例18: SPIDataPut//*****************************************************************************////! /brief Puts a data element into the SPI transmit .//!//! /param ulBase specifies the SPI module base address.//! /param ulData is the data to be transmitted over the SPI interface.//!//! This function places the supplied data into the transmit buffer of the//! specified SPI module.//!//! /note The data width is always 8-bit.//!//! /return None.////*****************************************************************************voidSPIDataPut(unsigned long ulBase, unsigned long ulData){ // // Check the arguments. // xASSERT((ulBase == SPI0_BASE) || (ulBase == SPI1_BASE)); xASSERT(ulData < 256); // // Wait until SPRF is set. // while(!(xHWREGB(ulBase + SPI_S) & SPI_S_SPTEF)) { } // // Write the data to the SPI. // xHWREGB(ulBase + SPI_D) = (unsigned char)ulData;}
开发者ID:brNX,项目名称:yarr,代码行数:36,
示例19: xWDTDisable//*****************************************************************************////! /brief Disable the Watchdog timer.//! This function is to Disable the Watchdog timer module and stop//! the counter.//!//! /param [in] ulBase is the base address of the WatchDog Timer(WDT) module.//! This value must be /ref xWDT_BASE.//!//! /return None.//!////*****************************************************************************void xWDTDisable(unsigned long ulBase){ // // Check the arguments. // xASSERT(ulBase == xWDT_BASE); SysCtlKeyAddrUnlock(); xHWREG(WDT_WTCR) &= ~WDT_WTCR_WTE; SysCtlKeyAddrLock();}
开发者ID:liamjeal,项目名称:cox,代码行数:25,
示例20: xWDTRestart//*****************************************************************************////! /brief Restart the Watchdog timer counter.//! This function is to restart the Watchdog timer by feed watchdog.//!//! /param [in] ulBase is the base address of the WatchDog Timer(WDT) module.//! This value must be /ref xWDT_BASE.//!//! /return None.//!//! /note User can use this function to feed the watch dog interval.////*****************************************************************************void xWDTRestart(unsigned long ulBase){ // // Check the arguments. // xASSERT(ulBase == xWDT_BASE); SysCtlKeyAddrUnlock(); xHWREG(WDT_WTCR) |= WDT_WTCR_WTR; SysCtlKeyAddrLock();}
开发者ID:liamjeal,项目名称:cox,代码行数:25,
示例21: PDMAChannelSoftwareReset//*****************************************************************************////! /brief Reset the PDMA of a channel.//!//! /param ulChannelID is the channel ID that have been disabled.//! The channel ID can be://! - PDMA_CHANNEL_0//! - PDMA_CHANNEL_1//! - others refrence /ref NUC1xx_PDMA_Channel_IDs//! .//!//! /return None.////*****************************************************************************void PDMAChannelSoftwareReset(unsigned long ulChannelID){ // // Check the arguments. // xASSERT(xDMAChannelIDValid(ulChannelID)); // // Disable PDMA channel. // xHWREG(g_psDMAChannelAddress[ulChannelID] + PDMA_CSR) |= PDMA_CSR_RST;}
开发者ID:Karplyak,项目名称:cox,代码行数:27,
示例22: CMPDMADisable//*****************************************************************************////! /brief Disable CMP DMA.//!//! /param ulBase is the base address of the CMP port.//!//! /return None.////*****************************************************************************voidCMPDMADisable(unsigned long ulBase){ // // Check the arguments. // xASSERT(ulBase == ACMP_BASE); // // Disable DMA for CMP // xHWREGB(ulBase + CMP0_SCR) &= ~CMP0_SCR_DMAEN;}
开发者ID:0xc0170,项目名称:cox,代码行数:22,
示例23: PDMADisable//*****************************************************************************////! /brief Disable the PDMA of a channel.//!//! /param ulChannelID is the channel ID that have been disabled.//! The channel ID can be://! - PDMA_CHANNEL_0//! - PDMA_CHANNEL_1//! - others refrence /ref NUC1xx_PDMA_Channel_IDs//! .//!//! /return None.////*****************************************************************************void PDMADisable(unsigned long ulChannelID){ // // Check the arguments. // xASSERT(xDMAChannelIDValid(ulChannelID)); // // Disable PDMA channel. // xHWREG(g_psDMAChannelAddress[ulChannelID] + PDMA_CSR) &= ~PDMA_CSR_CEN;}
开发者ID:Karplyak,项目名称:cox,代码行数:27,
示例24: CMPOutputSet//*****************************************************************************////! /brief Set Comparator Output.//!//! /param ulBase is the base address of the CMP module.//! /param ulOutput is Output that you will set. //! Refrence /ref KLx_CMP_Output.//!//! This function is to Set Comparator Output.//!//! /return None.////*****************************************************************************voidCMPOutputSet(unsigned long ulBase, unsigned long ulOutput){ // // Check the arguments // xASSERT(ulBase == ACMP_BASE); xASSERT((ulOutput == CMP_OUTPUT_COUT) || (ulOutput == CMP_OUTPUT_COUTA)); // // Select CMP Output // if(ulOutput == CMP_OUTPUT_COUTA) { xHWREGB(ulBase + CMP0_CR1) |= CMP0_CR1_COS; } else { xHWREGB(ulBase + CMP0_CR1) &= ~CMP0_CR1_COS; }}
开发者ID:0xc0170,项目名称:cox,代码行数:35,
示例25: CMPPowerModeSet//*****************************************************************************////! /brief Set Comparator Power Mode.//!//! /param ulBase is the base address of the CMP module.//! /param ulPowerMode is Low-Power Configuration Mode that you will set. //! Refrence /ref KLx_CMP_Power_Mode.//!//! This function is to Select ADC Power Mode.//!//! /return None.////*****************************************************************************voidCMPPowerModeSet(unsigned long ulBase, unsigned long ulPowerMode){ // // Check the arguments // xASSERT(ulBase == ACMP_BASE); xASSERT((ulPowerMode == CMP_POWER_MODE_LS) || (ulPowerMode == CMP_POWER_MODE_HS)); // // Select CMP Power Mode // if(ulPowerMode == CMP_POWER_MODE_HS) { xHWREGB(ulBase + CMP0_CR1) |= CMP0_CR1_PMODE; } else { xHWREGB(ulBase + CMP0_CR1) &= ~CMP0_CR1_PMODE; }}
开发者ID:0xc0170,项目名称:cox,代码行数:35,
示例26: CMPFilterSampleCountSet//*****************************************************************************////! /brief Set CMP0 Filter Sample Count.//!//! /param ulBase is the base address of the comparator module.//! /param ulCount is the Filter Sample Count which you will set.//!//! This function is used to Set CMP0 Filter Sample Count.//!//! /note if ulCount is CMP_FILTER_SAMPLE_COUNT_0, then Filter is disabled. //! If SE = 1, then COUT is a logic 0. This is not a legal state, and is not//! recommended. If SE = 0, COUT = COUTA.//!//! /return None.////*****************************************************************************voidCMPFilterSampleCountSet(unsigned long ulBase, unsigned long ulCount) { // // Check the arguments // xASSERT(ulBase == ACMP_BASE); xASSERT((ulCount == CMP_FILTER_SAMPLE_COUNT_0)|| (ulCount == CMP_FILTER_SAMPLE_COUNT_1)|| (ulCount == CMP_FILTER_SAMPLE_COUNT_2)|| (ulCount == CMP_FILTER_SAMPLE_COUNT_3)|| (ulCount == CMP_FILTER_SAMPLE_COUNT_4)|| (ulCount == CMP_FILTER_SAMPLE_COUNT_5)|| (ulCount == CMP_FILTER_SAMPLE_COUNT_6)|| (ulCount == CMP_FILTER_SAMPLE_COUNT_7)); // // Set Filter Sample Count // xHWREGB(ulBase + CMP0_CR0) &= ~CMP0_CR0_FILTER_CNT_M; xHWREGB(ulBase + CMP0_CR0) |= ulCount;}
开发者ID:0xc0170,项目名称:cox,代码行数:38,
示例27: WWDGEnable//*****************************************************************************////! /brief Enable Window watchdog.//!//! /param ulBase specifies the Window watchdog base address.//!//! Enable Window watchdog.//!//! /return None.////*****************************************************************************voidWWDGEnable(unsigned long ulBase){ // // Check the arguments. // xASSERT((ulBase == WWDG_BASE)); // // Enable Window watchdog // xHWREG(WWDG_CR) |= WWDG_CR_WDT_EN;}
开发者ID:sangwook236,项目名称:general-development-and-testing,代码行数:24,
示例28: DMADisable//*****************************************************************************////! /brief Disable the DMA of a channel.//!//! /param ulChannelID is the channel ID that have been disabled.//! The channel ID can be://! - DMA1_CHANNEL_1//! - DMA1_CHANNEL_2//! - others refrence /ref STM32F1xx_DMA_Channel_IDs//! .//!//! /return None.////*****************************************************************************void DMADisable(unsigned long ulChannelID){ // // Check the arguments. // xASSERT(xDMAChannelIDValid(ulChannelID)); // // Disable DMA channel. // xHWREG(g_psDMAChannel[ulChannelID]) &= ~DMA_CCR1_EN;}
开发者ID:Limius,项目名称:cox,代码行数:27,
示例29: DMADisable//*****************************************************************************////! /brief Disable the DMA of a channel.//!//! /param ulChannelID is the channel ID that have been disabled.//! The channel ID can be://! - DMA_CHANNEL_0//! - DMA_CHANNEL_1//! - others refrence /ref KLx_DMA_Channel_IDs//! .//!//! /return None.////*****************************************************************************void DMADisable(unsigned long ulChannelID){ // // Check the arguments. // xASSERT(xDMAChannelIDValid(ulChannelID)); // // Disable DMA channel. // xHWREGB(DMAMUX0_BASE + ulChannelID) &= ~DMAMUX0_CHCFG_ENBL;}
开发者ID:0xc0170,项目名称:cox,代码行数:27,
示例30: DMAChannelControlSet//*****************************************************************************////! /brief Sets the control parameters for a DMA channel.//!//! /param ulChannelID is the DMA channel ID.//! /param ulControl is logical OR of several control values to set the control//! parameters for the channel.//!//! This function is used to set control parameters for a uDMA transfer. These//! are typically parameters that are not changed often.//!//! The /e ulControl parameter is the logical OR of five values: the data size,//! the source address increment, the destination address increment.//!//! Choose the source data size from one of /b DMA_WIDTH_8BIT, //! /b DMA_WIDTH_16BIT, /b or DMA_WIDTH_32BIT to select a data size //! of 8, 16, or 32 bits.//!//! Choose the destination data size from one of /b DMA_WIDTH_8BIT, //! /b DMA_WIDTH_16BIT, /b or DMA_WIDTH_32BIT to select a data size //! of 8, 16, or 32 bits.//!//! Choose the source address increment from one of /b DMA_SRC_DIR_INC,//! /b DMA_SRC_DIR_FIXED to selectan address increment or select //! non-incrementing //!//! Choose the destination address increment from one of /b DMA_DST_DIR_INC,//! /b DMA_DST_DIR_FIXED to selectan address increment or select //! non-incrementing //!//! /note The address increment cannot be smaller than the data size. //! The transfer may use burst or single.//!//! /return None.////*****************************************************************************voidDMAChannelControlSet(unsigned long ulChannelID, unsigned long ulControl) { // // Check the arguments. // xASSERT(xDMAChannelIDValid(ulChannelID)); xHWREG(g_psDMAChannelAddress[ulChannelID] + DMA_DCR) &= ~(DMA_DCR_SINC | DMA_DCR_SSIZE_M | DMA_DCR_DINC | DMA_DCR_DSIZE_M); xHWREG(g_psDMAChannelAddress[ulChannelID] + DMA_DCR) |= ulControl;}
开发者ID:0xc0170,项目名称:cox,代码行数:49,
注:本文中的xASSERT函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ xAreBlockTimeTestTasksStillRunning函数代码示例 C++ x86_mov_reg_membase函数代码示例 |