当前位置: 首页>>代码示例>>C++>>正文


C++ PIO_Clear函数代码示例

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


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

示例1: motor_setdir

void motor_setdir(unsigned char axis, unsigned char dir){
    switch(axis){
        case(0):
            if(dir)
                PIO_Set(&XDIR);
            else
                PIO_Clear(&XDIR);
            break;
        case(1):
            if(dir)
                PIO_Set(&YDIR);
            else
                PIO_Clear(&YDIR);
            break;
        case(2):
            if(dir)
                PIO_Set(&ZDIR);
            else
                PIO_Clear(&ZDIR);
            break;
        case(3):
            if(dir)
                PIO_Set(&E0DIR);
            else
                PIO_Clear(&E0DIR);
            break;
        case(4):
            if(dir)
                PIO_Set(&E1DIR);
            else
                PIO_Clear(&E1DIR);
            break;
    }
}
开发者ID:minimaster,项目名称:4pi,代码行数:34,代码来源:motoropts.c

示例2: motor_enaxis

void motor_enaxis(unsigned char axis, unsigned char en){
    switch(axis){
        case(0):
            if(!en)
                PIO_Set(&XEN);
            else
                PIO_Clear(&XEN);
            break;
        case(1):
            if(!en)
                PIO_Set(&YEN);
            else
                PIO_Clear(&YEN);
            break;
        case(2):
            if(!en)
                PIO_Set(&ZEN);
            else
                PIO_Clear(&ZEN);
            break;
        case(3):
            if(!en)
                PIO_Set(&E0EN);
            else
                PIO_Clear(&E0EN);
            break;
        case(4):
            if(!en)
                PIO_Set(&E1EN);
            else
                PIO_Clear(&E1EN);
            break;
    }
}
开发者ID:minimaster,项目名称:4pi,代码行数:34,代码来源:motoropts.c

示例3: vParTestSetLED

void vParTestSetLED( unsigned portBASE_TYPE uxLED, signed portBASE_TYPE xValue )
{
    if( uxLED < partestNUM_LEDS ) {
        if( xValue ) {
            /* Turn the LED on. */
            portENTER_CRITICAL();
            {
                if( xLEDPins[ uxLED ].type == PIO_OUTPUT_0 ) {
                    PIO_Set( &( xLEDPins[ uxLED ]) );
                } else {
                    PIO_Clear( &( xLEDPins[ uxLED ] ) );
                }
            }
            portEXIT_CRITICAL();
        } else {
            /* Turn the LED off. */
            portENTER_CRITICAL();
            {
                if( xLEDPins[ uxLED ].type == PIO_OUTPUT_0 ) {
                    PIO_Clear( &( xLEDPins[ uxLED ] ) );
                } else {
                    PIO_Set( &( xLEDPins[ uxLED ] ) );
                }
            }
            portEXIT_CRITICAL();
        }
    }
}
开发者ID:peterliu2,项目名称:FreeRTOS,代码行数:28,代码来源:ParTest.c

示例4: motor_unstep

inline void motor_unstep(){
    PIO_Clear(&XSTEP);
    PIO_Clear(&YSTEP);
    PIO_Clear(&ZSTEP);
    PIO_Clear(&E0STEP);
    PIO_Clear(&E1STEP);
}
开发者ID:minimaster,项目名称:4pi,代码行数:7,代码来源:motoropts.c

示例5: __attribute__

__attribute__((always_inline)) void motor_unstep(){
    PIO_Clear(&XSTEP);
    PIO_Clear(&YSTEP);
    PIO_Clear(&ZSTEP);
    PIO_Clear(&E0STEP);
    PIO_Clear(&E1STEP);
}
开发者ID:WebSpider,项目名称:4pi-firmware,代码行数:7,代码来源:motoropts.c

示例6: LCDD_SetBacklight

//------------------------------------------------------------------------------
/// Set the backlight of the LCD.
/// \param level   Backlight brightness level [1..32], 32 is maximum level.
//------------------------------------------------------------------------------
void LCDD_SetBacklight (unsigned int level)
{
    unsigned int i;
    const Pin pPins[] = {BOARD_BACKLIGHT_PIN};

    // Enable pins
    PIO_Configure(pPins, PIO_LISTSIZE(pPins));

    // Switch off backlight
    PIO_Clear(pPins);
    i = 600 * (BOARD_MCK / 1000000);    // wait for at least 500us
    while(i--);

    // Set new backlight level
    for (i = 0; i < level; i++) {

      
        PIO_Clear(pPins);
        PIO_Clear(pPins);
        PIO_Clear(pPins);
        
        
        PIO_Set(pPins);
        PIO_Set(pPins);
        PIO_Set(pPins);

//        PIO_Clear(pPins);
//        PIO_Clear(pPins);
//        PIO_Clear(pPins);
    }
//    PIO_Set(pPins);
}
开发者ID:craiglink,项目名称:at91lib,代码行数:36,代码来源:lcdd_hx8347.c

示例7: nrf24l01plus_init

// Initialise radio (in rx mode)
void nrf24l01plus_init(void)
{
    int i;
    
    Init_SPI(); // Enable SPI
    
    PIO_Clear(&CE);
    PIO_Set(&CSN);    
    
    for(i=0; i<32; i++)
        tx_buf[i] = 0; // init buffer
    
    PIO_Clear(&CE);    
    
    SPI_Write_Buf(WRITE_REG + TX_ADDR, TX_ADDRESS, TX_ADR_WIDTH);    // Writes TX_Address to nRF24L01
    SPI_Write_Buf(WRITE_REG + RX_ADDR_P0, TX_ADDRESS, TX_ADR_WIDTH); // RX_Addr0 same as TX_Adr

    SPI_RW_Reg(WRITE_REG + EN_AA, 0x00);      // Disable Auto.Ack
    SPI_RW_Reg(WRITE_REG + EN_RXADDR, 0x01);  // Enable Pipe0
    SPI_RW_Reg(WRITE_REG + RX_PW_P0, TX_PLOAD_WIDTH); // Select same RX payload width as TX Payload width
    //SPI_RW_Reg(WRITE_REG + SETUP_RETR, 0x1a);       // 500us + 86us, 10 retransmissions. (not needed - no auto ack)
    SPI_RW_Reg(WRITE_REG + RF_CH, RF_CHANNEL);        // Select RF channel
    SPI_RW_Reg(WRITE_REG + RF_SETUP, 0x07);   // TX_PWR:0dBm, Datarate:1Mbps
    SPI_RW_Reg(WRITE_REG + CONFIG, 0x0f);     // Set PWR_UP bit, enable CRC(2 unsigned chars) & Prim:TX. MAX_RT & TX_DS enabled..
    
    PIO_Set(&CE);
}
开发者ID:ichpuchtli,项目名称:freeburn,代码行数:28,代码来源:nrf24l01plus.c

示例8: ILI9488_EbiSendCommand

uint8_t ILI9488_EbiSendCommand(uint16_t Instr, uint16_t *pTxData,
							   uint32_t *pRxData, AccessIli_t ReadWrite, uint32_t size)
{
	command = Instr;

	if (ReadWrite == AccessInst) {
		PIO_Clear(&lcd_ebi_cds_pin);
		ili9488DmaCtlInEbiMode.cmdOrDataFlag = 1;
		return ILI9488_EbiDmaTxTransfer(&command, 1);
	} else if (ReadWrite == AccessWrite) {
		PIO_Clear(&lcd_ebi_cds_pin);
		ili9488DmaCtlInEbiMode.cmdOrDataFlag = 1;
		ILI9488_EbiDmaTxTransfer(&command, 1);

		if (size == 0) return 0;

		ILI9488_EbiDmaTxTransfer(pTxData, size);
		return 0;
	} else {
		ili9488DmaCtlInEbiMode.rxDoneFlag = 0;
		ILI9488_EbiDmaRxTransfer(pRxData, size);

		while (!ili9488DmaCtlInEbiMode.rxDoneFlag);
	}

	return 0;
}
开发者ID:codingzhouk,项目名称:LiteOS_Kernel,代码行数:27,代码来源:ili9488_ebi_dma.c

示例9: LCDD_SetBacklight

/**
 * \brief Set the backlight of the LCD.
 *
 * \param level   Backlight brightness level [1..16], 1 means maximum brightness.
 */
void LCDD_SetBacklight (uint32_t level)
{
    uint32_t i;
    const Pin pPins[] = {BOARD_BACKLIGHT_PIN};

    /* Ensure valid level */
    level = (level < 1) ? 1 : level;
    level = (level > 16) ? 16 : level;

    /* Enable pins */
    PIO_Configure(pPins, PIO_LISTSIZE(pPins));

    /* Switch off backlight */
    PIO_Clear(pPins);
    i = 600 * (BOARD_MCK / 1000000);    /* wait for at least 500us */
    while(i--);

    /* Set new backlight level */
    for (i = 0; i < level; i++) {
        PIO_Clear(pPins);
        PIO_Clear(pPins);
        PIO_Clear(pPins);

        PIO_Set(pPins);
        PIO_Set(pPins);
        PIO_Set(pPins);
    }
}
开发者ID:calao-systems,项目名称:calao-samba,代码行数:33,代码来源:lcdd.c

示例10: GLCD_EnableController

//-------------------------------------------------------------------------------------------------
//
//-------------------------------------------------------------------------------------------------
void GLCD_EnableController(unsigned char controller)
{
    switch(controller)
    {
        case 0 : PIO_Clear(&GLcdpins[4]); break;
        case 1 : PIO_Clear(&GLcdpins[3]); break;
    }
}
开发者ID:naminic,项目名称:Grafical-Lcd-Arm,代码行数:11,代码来源:glcd.c

示例11: AD5206_sendbit

void AD5206_sendbit(unsigned char bit){
    volatile unsigned int uDummy;
    for (uDummy=0; uDummy<512; ++uDummy);
    PIO_Clear(&SCK);
    if(bit)
        PIO_Set(&MOSI);
    else
        PIO_Clear(&MOSI);
    for (uDummy=0; uDummy<512; ++uDummy);
    PIO_Set(&SCK);
}
开发者ID:minimaster,项目名称:4pi,代码行数:11,代码来源:motoropts.c

示例12: motor_setopts

void motor_setopts(unsigned char axis, unsigned char ustepbits, unsigned char current){
    Pin MS1;
    Pin MS2;
    
    unsigned char channel;
    switch(axis){
        case 0:
            MS1=XMS1;
            MS2=XMS2;
            channel=3;
            break;
        case 1:
            MS1=YMS1;
            MS2=YMS2;
            channel=1;
            break;
        case 2:
            MS1=ZMS1;
            MS2=ZMS2;
            channel=0;
            break;
        case 3:
            MS1=E0MS1;
            MS2=E0MS2;
            channel=2;
            break;
        case 4:
            MS1=E1MS1;
            MS2=E1MS2;
            channel=5;
            break;
        case 6:
            ustepbits=4;
            channel=4;
            break;
        default:
            return;
    }
    if(ustepbits<4){
        if(ustepbits&1)
            PIO_Set(&MS1);
        else
            PIO_Clear(&MS1);
        if(ustepbits&2)
            PIO_Set(&MS2);
        else
            PIO_Clear(&MS2);
    }
    AD5206_setchan(channel,current);

	//printf("Setting channel %u to current value %u and ustep value %u\r\n",channel, current, ustepbits);
	
}
开发者ID:minimaster,项目名称:4pi,代码行数:53,代码来源:motoropts.c

示例13: main

int main(void) {
	device_init();
	init_display();

	PIO_Set(&display_pins[0]);
	PIO_Clear(&display_pins[1]);
	PIO_Clear(&display_pins[2]);
	PIO_Set(&display_pins[3]);
	while(1){

	}
}
开发者ID:raviyellani,项目名称:alarm,代码行数:12,代码来源:main.c

示例14: lcd_putchar

// ============================================================================
void lcd_putchar(char ch)
{
        PIO_Set(&Lcdpins[0]);
	setD4567(ch);
        PIO_Set(&Lcdpins[1]);
	clcd_minDelay();
        PIO_Clear(&Lcdpins[1]);
	clcd_minDelay();
	setD4567(ch<<4);
        PIO_Set(&Lcdpins[1]);
	clcd_minDelay();
        PIO_Clear(&Lcdpins[1]);
	clcd_Delay();
}
开发者ID:naminic,项目名称:Arm-Alphanumeric-LCD,代码行数:15,代码来源:lcd4bit.c

示例15: lcd_command

// ============================================================================
void lcd_command(char cmd)	//Sends Command to LCD
{
        PIO_Clear(&Lcdpins[0]);
	setD4567(cmd);
        PIO_Set(&Lcdpins[1]);
	clcd_minDelay();
        PIO_Clear(&Lcdpins[1]);
	clcd_minDelay();
	setD4567(cmd<<4);
        PIO_Set(&Lcdpins[1]);
	clcd_minDelay();
        PIO_Clear(&Lcdpins[1]);
	clcd_Delay();
}
开发者ID:naminic,项目名称:Arm-Alphanumeric-LCD,代码行数:15,代码来源:lcd4bit.c


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