• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ GPIO_PDOR_PDO函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: switch

int DigitalOutputPin::Status()
{
    int ret = 0;
        switch( GPIOPorts[ (int)pin ] )
        {
            case PortA:
            {
                ret = GPIOA_PDOR & GPIO_PDOR_PDO( GPIO_PIN( GPIOPinNumbers[ (int)pin ] ) );
                break;
            }
            case PortB:
            {
                ret = GPIOB_PDOR & GPIO_PDOR_PDO( GPIO_PIN( GPIOPinNumbers[ (int)pin ] ) );
                break;
            }
            case PortC:
            {
                ret = GPIOC_PDOR & GPIO_PDOR_PDO( GPIO_PIN( GPIOPinNumbers[ (int)pin ] ) );
                break;
            }
            case PortD:
            {
                ret = GPIOD_PDOR & GPIO_PDOR_PDO( GPIO_PIN( GPIOPinNumbers[ (int)pin ] ) );
                break;
            }
            case PortE:
            {
                ret = GPIOE_PDOR & GPIO_PDOR_PDO( GPIO_PIN( GPIOPinNumbers[ (int)pin ] ) );
                break;
            }
        }
        return ret;
}
开发者ID:fishbein16,项目名称:C2_Robot,代码行数:33,代码来源:FEHIO.cpp


示例2: LCD_WrDat

void LCD_WrDat(u8 data)
{
	u8 i=8;
	//LCD_CS=0;;
//	GPIOC_PDOR |=  GPIO_PDOR_PDO(GPIO_PIN(15));;;;
        GPIOA_PDOR |=  GPIO_PDOR_PDO(GPIO_PIN(16));;;;
        asm("nop"); 
//      GPIOC_PDOR &= ~GPIO_PDOR_PDO(GPIO_PIN(12));;;;
        GPIOE_PDOR &= ~GPIO_PDOR_PDO(GPIO_PIN(25));;;;
      asm("nop");    
  while(i--)
  {
//    if(data&0x80){GPIOC_PDOR |=  GPIO_PDOR_PDO(GPIO_PIN(13));;;;}
    if(data&0x80){GPIOE_PDOR |=  GPIO_PDOR_PDO(GPIO_PIN(24));;;;}
//    else{GPIOC_PDOR &= ~GPIO_PDOR_PDO(GPIO_PIN(13));;;;}
    else{GPIOE_PDOR &= ~GPIO_PDOR_PDO(GPIO_PIN(24));;;;}
//    GPIOC_PDOR |=  GPIO_PDOR_PDO(GPIO_PIN(12)); 
    GPIOE_PDOR |=  GPIO_PDOR_PDO(GPIO_PIN(25));
    asm("nop");;;;
		//asm("nop");            
//    GPIOC_PDOR &= ~GPIO_PDOR_PDO(GPIO_PIN(12));;;;; 
    GPIOE_PDOR &= ~GPIO_PDOR_PDO(GPIO_PIN(25));;;;;
    data<<=1;    
  }
	//LCD_CS=1;
}
开发者ID:YoshimiSakuka,项目名称:K10,代码行数:26,代码来源:Oled.c


示例3: LCD_WrCmd

void LCD_WrCmd(u8 cmd)
{
	u8 i=8;
	
	//LCD_CS=0;;
//  GPIOC_PDOR &= ~GPIO_PDOR_PDO(GPIO_PIN(15));;;;;
//  GPIOC_PDOR &= ~GPIO_PDOR_PDO(GPIO_PIN(12));;;;;
  GPIOA_PDOR &= ~GPIO_PDOR_PDO(GPIO_PIN(16));;;;;
  GPIOE_PDOR &= ~GPIO_PDOR_PDO(GPIO_PIN(25));;;;;
  //asm("nop");   
  while(i--)
  {
//    if(cmd&0x80){GPIOC_PDOR |=  GPIO_PDOR_PDO(GPIO_PIN(13));;;;;}
    if(cmd&0x80){GPIOE_PDOR |=  GPIO_PDOR_PDO(GPIO_PIN(24));;;;;}
//    else{GPIOC_PDOR &= ~GPIO_PDOR_PDO(GPIO_PIN(13));;;;;;}
    else{GPIOE_PDOR &= ~GPIO_PDOR_PDO(GPIO_PIN(24));;;;;;}
//    GPIOC_PDOR |=  GPIO_PDOR_PDO(GPIO_PIN(12));;;;;
    GPIOE_PDOR |=  GPIO_PDOR_PDO(GPIO_PIN(25));;;;;
    asm("nop");;;;
		//asm("nop");             
//    GPIOC_PDOR &= ~GPIO_PDOR_PDO(GPIO_PIN(12));;;;;  
    GPIOE_PDOR &= ~GPIO_PDOR_PDO(GPIO_PIN(25));;;;; 
    cmd<<=1;;;;;   
  } 	
	//LCD_CS=1;
}
开发者ID:YoshimiSakuka,项目名称:K10,代码行数:26,代码来源:Oled.c


示例4: leds_arch_init

/*---------------------------------------------------------------------------*/
void
leds_arch_init(void)
{
	/**
	 * Initialize blue led 
	*/
	/* Configure pin as output */
    GPIOD_PDDR |= GPIO_PDDR_PDD(0x02);                                   
    /* Set initialization value */
    GPIOD_PDOR &= (uint32_t)~(uint32_t)(GPIO_PDOR_PDO(0x02));                                   
    /* Initialization of Port Control register */
    PORTD_PCR1 = (uint32_t)((PORTD_PCR1 & (uint32_t)~(uint32_t)(
                  PORT_PCR_ISF_MASK |
                  PORT_PCR_MUX(0x06)
                 )) | (uint32_t)(
                  PORT_PCR_MUX(0x01)
                 ));
	
	/**
	 * Initialize green led 
	*/
	/* Configure pin as output */
  	GPIOB_PDDR |= GPIO_PDDR_PDD(0x00080000);                                   
  	/* Set initialization value */
  	GPIOB_PDOR &= (uint32_t)~(uint32_t)(GPIO_PDOR_PDO(0x00080000));                                   
  	/* Initialization of Port Control register */
	PORTB_PCR19 = (uint32_t)((PORTB_PCR19 & (uint32_t)~(uint32_t)(
                 PORT_PCR_ISF_MASK |
                 PORT_PCR_MUX(0x06)
                )) | (uint32_t)(
                 PORT_PCR_MUX(0x01)
                ));
	   
  	/**
  	 * Initialize red led 
  	*/
  	/* Configure pin as output */
	GPIOB_PDDR |= GPIO_PDDR_PDD(0x00040000);                                   
  	/* Set initialization value */
	GPIOB_PDOR &= (uint32_t)~(uint32_t)(GPIO_PDOR_PDO(0x00040000));                                   
  	/* Initialization of Port Control register */
	PORTB_PCR18 = (uint32_t)((PORTB_PCR18 & (uint32_t)~(uint32_t)(
                 PORT_PCR_ISF_MASK |
                 PORT_PCR_MUX(0x06)
                )) | (uint32_t)(
                 PORT_PCR_MUX(0x01)
                ));         
}
开发者ID:AlexanderWiniger,项目名称:kinetis-mote,代码行数:49,代码来源:leds-arch.c


示例5: LEDRed_Init

/* ===================================================================*/
LDD_TDeviceData* LEDRed_Init(LDD_TUserData *UserDataPtr)
{
  /* Allocate LDD device structure */
  LEDRed_TDeviceData *DeviceDataPrv;

  /* {Default RTOS Adapter} Driver memory allocation: Dynamic allocation is simulated by a pointer to the static object */
  DeviceDataPrv = &DeviceDataPrv__DEFAULT_RTOS_ALLOC;
  /* Save RTOS Device structure */
  DeviceDataPrv->UserData = UserDataPtr; /* Store the RTOS device structure */
  /* Enable device clock gate */
  /* SIM_SCGC5: PORTC=1 */
  SIM_SCGC5 |= SIM_SCGC5_PORTC_MASK;
  /* GPIOC_PDOR: PDO|=0x0200 */
  GPIOC_PDOR |= GPIO_PDOR_PDO(0x0200);
  /* GPIOC_PDDR: PDD|=0x0200 */
  GPIOC_PDDR |= GPIO_PDDR_PDD(0x0200);
  /* Initialization of pin routing */
  /* PORTC_PCR9: ISF=0,MUX=1 */
  PORTC_PCR9 = (uint32_t)((PORTC_PCR9 & (uint32_t)~(uint32_t)(
                PORT_PCR_ISF_MASK |
                PORT_PCR_MUX(0x06)
               )) | (uint32_t)(
                PORT_PCR_MUX(0x01)
               ));
  /* Registration of the device structure */
  PE_LDD_RegisterDeviceStructure(PE_LDD_COMPONENT_LEDRed_ID,DeviceDataPrv);
  return ((LDD_TDeviceData *)DeviceDataPrv);
}
开发者ID:SeismicPi,项目名称:SeismicPi,代码行数:29,代码来源:LEDRed.c


示例6: TraccionTrasera_Direccion_Init

/* ===================================================================*/
LDD_TDeviceData* TraccionTrasera_Direccion_Init(LDD_TUserData *UserDataPtr)
{
  /* Allocate device structure */
  TraccionTrasera_Direccion_TDeviceDataPtr DeviceDataPrv;

  /* {FreeRTOS RTOS Adapter} Driver memory allocation: RTOS function call is defined by FreeRTOS RTOS Adapter property */
  DeviceDataPrv = (TraccionTrasera_Direccion_TDeviceData *)pvPortMalloc(sizeof(TraccionTrasera_Direccion_TDeviceData));
  #if FreeRTOS_CHECK_MEMORY_ALLOCATION_ERRORS
  if (DeviceDataPrv == NULL) {
    return (NULL);
  }
  #endif
  DeviceDataPrv->UserDataPtr = UserDataPtr; /* Store the RTOS device structure */
  /* Configure pin as output */
  /* GPIOE_PDDR: PDD|=8 */
  GPIOE_PDDR |= GPIO_PDDR_PDD(0x08);
  /* Set initialization value */
  /* GPIOE_PDOR: PDO&=~8 */
  GPIOE_PDOR &= (uint32_t)~(uint32_t)(GPIO_PDOR_PDO(0x08));
  /* Initialization of Port Control register */
  /* PORTE_PCR3: ISF=0,MUX=1 */
  PORTE_PCR3 = (uint32_t)((PORTE_PCR3 & (uint32_t)~(uint32_t)(
                PORT_PCR_ISF_MASK |
                PORT_PCR_MUX(0x06)
               )) | (uint32_t)(
                PORT_PCR_MUX(0x01)
               ));
  /* Registration of the device structure */
  PE_LDD_RegisterDeviceStructure(PE_LDD_COMPONENT_TraccionTrasera_Direccion_ID,DeviceDataPrv);
  return ((LDD_TDeviceData *)DeviceDataPrv);
}
开发者ID:francodemare,项目名称:RoboTito,代码行数:32,代码来源:TraccionTrasera_Direccion.c


示例7: BitIoLdd4_Init

/* ===================================================================*/
LDD_TDeviceData* BitIoLdd4_Init(LDD_TUserData *UserDataPtr)
{
  /* Allocate device structure */
  BitIoLdd4_TDeviceDataPtr DeviceDataPrv;

  /* {Default RTOS Adapter} Driver memory allocation: Dynamic allocation is simulated by a pointer to the static object */
  DeviceDataPrv = &DeviceDataPrv__DEFAULT_RTOS_ALLOC;
  DeviceDataPrv->UserDataPtr = UserDataPtr; /* Store the RTOS device structure */
  /* Enable device clock gate */
  /* SIM_SCGC5: PORTD=1 */
  SIM_SCGC5 |= SIM_SCGC5_PORTD_MASK;
  /* Configure pin as output */
  /* GPIOD_PDDR: PDD|=8 */
  GPIOD_PDDR |= GPIO_PDDR_PDD(0x08);
  /* Set initialization value */
  /* GPIOD_PDOR: PDO&=~8 */
  GPIOD_PDOR &= (uint32_t)~(uint32_t)(GPIO_PDOR_PDO(0x08));
  /* Initialization of pin routing */
  /* PORTD_PCR3: ISF=0,MUX=1 */
  PORTD_PCR3 = (uint32_t)((PORTD_PCR3 & (uint32_t)~(uint32_t)(
                PORT_PCR_ISF_MASK |
                PORT_PCR_MUX(0x06)
               )) | (uint32_t)(
                PORT_PCR_MUX(0x01)
               ));
  /* Registration of the device structure */
  PE_LDD_RegisterDeviceStructure(PE_LDD_COMPONENT_BitIoLdd4_ID,DeviceDataPrv);
  return ((LDD_TDeviceData *)DeviceDataPrv);
}
开发者ID:psh117,项目名称:Jack-Spherobot,代码行数:30,代码来源:BitIoLdd4.c


示例8: GPIO2_Init

/* ===================================================================*/
LDD_TDeviceData* GPIO2_Init(LDD_TUserData *UserDataPtr)
{
  /* Allocate LDD device structure */
  GPIO2_TDeviceData *DeviceDataPrv;

  /* {Default RTOS Adapter} Driver memory allocation: Dynamic allocation is simulated by a pointer to the static object */
  DeviceDataPrv = &DeviceDataPrv__DEFAULT_RTOS_ALLOC;
  /* Save RTOS Device structure */
  DeviceDataPrv->UserData = UserDataPtr; /* Store the RTOS device structure */
  /* GPIOE_PDOR: PDO|=0x000C0000 */
  GPIOE_PDOR |= GPIO_PDOR_PDO(0x000C0000);
  /* GPIOE_PDDR: PDD|=0x000C0000 */
  GPIOE_PDDR |= GPIO_PDDR_PDD(0x000C0000);
  /* Initialization of Port Control registers */
  /* PORTE_PCR18: ISF=0,MUX=1 */
  PORTE_PCR18 = (uint32_t)((PORTE_PCR18 & (uint32_t)~(uint32_t)(
                 PORT_PCR_ISF_MASK |
                 PORT_PCR_MUX(0x06)
                )) | (uint32_t)(
                 PORT_PCR_MUX(0x01)
                ));
  /* PORTE_PCR19: ISF=0,MUX=1 */
  PORTE_PCR19 = (uint32_t)((PORTE_PCR19 & (uint32_t)~(uint32_t)(
                 PORT_PCR_ISF_MASK |
                 PORT_PCR_MUX(0x06)
                )) | (uint32_t)(
                 PORT_PCR_MUX(0x01)
                ));
  /* Registration of the device structure */
  PE_LDD_RegisterDeviceStructure(PE_LDD_COMPONENT_GPIO2_ID,DeviceDataPrv);
  return ((LDD_TDeviceData *)DeviceDataPrv);
}
开发者ID:geliang201201,项目名称:CO2_Sensor,代码行数:33,代码来源:GPIO2.C


示例9: BitIoLdd2_Init

/* ===================================================================*/
LDD_TDeviceData* BitIoLdd2_Init(LDD_TUserData *UserDataPtr)
{
  /* Allocate device structure */
  BitIoLdd2_TDeviceDataPtr DeviceDataPrv;

  /* {Default RTOS Adapter} Driver memory allocation: Dynamic allocation is simulated by a pointer to the static object */
  DeviceDataPrv = &DeviceDataPrv__DEFAULT_RTOS_ALLOC;
  DeviceDataPrv->UserDataPtr = UserDataPtr; /* Store the RTOS device structure */
  /* Configure pin as output */
  /* GPIOB_PDDR: PDD|=0x0200 */
  GPIOB_PDDR |= GPIO_PDDR_PDD(0x0200);
  /* Set initialization value */
  /* GPIOB_PDOR: PDO&=~0x0200 */
  GPIOB_PDOR &= (uint32_t)~(uint32_t)(GPIO_PDOR_PDO(0x0200));
  /* Initialization of Port Control register */
  /* PORTB_PCR9: ISF=0,MUX=1 */
  PORTB_PCR9 = (uint32_t)((PORTB_PCR9 & (uint32_t)~(uint32_t)(
                PORT_PCR_ISF_MASK |
                PORT_PCR_MUX(0x06)
               )) | (uint32_t)(
                PORT_PCR_MUX(0x01)
               ));
  /* Registration of the device structure */
  PE_LDD_RegisterDeviceStructure(PE_LDD_COMPONENT_BitIoLdd2_ID,DeviceDataPrv);
  return ((LDD_TDeviceData *)DeviceDataPrv);
}
开发者ID:thihaElec,项目名称:my-git,代码行数:27,代码来源:BitIoLdd2.c


示例10: cam_start

void cam_start() {	
	// call pwm driver to start camera clock (CLK) for a 5% duty cycle
	FTM2_CNT = 0;
	FTM2_C0V = 45;
	
	// set cam flag
	cam_flag = EXEC_FLAG_UP;
	
	// set SI pulse high
	GPIOA_PSOR |= GPIO_PDOR_PDO(GPIO_PIN(14));
	
	// enable interrupt
	enable_irq(64);
}
开发者ID:kchapdaily,项目名称:alfc,代码行数:14,代码来源:cam.c


示例11: uxParTestGetLED

unsigned portBASE_TYPE uxParTestGetLED( unsigned portBASE_TYPE uxLED )
{
unsigned portBASE_TYPE uxReturn = pdFALSE;

	if( uxLED < partstNUM_LEDs )
	{
		portENTER_CRITICAL();
		{            
			uxReturn = !(GPIOA_PDOR & GPIO_PDOR_PDO(GPIO_PIN(10)));
		}
		portEXIT_CRITICAL();
	}
        
        return uxReturn;
}
开发者ID:LouisMo,项目名称:New-Balance-Program-Structure,代码行数:15,代码来源:ParTest.c


示例12: GPIO1_Init

/* ===================================================================*/
LDD_TDeviceData* GPIO1_Init(LDD_TUserData *UserDataPtr)
{
  /* Allocate LDD device structure */
  GPIO1_TDeviceData *DeviceDataPrv;

  /* {MQXLite RTOS Adapter} Driver memory allocation: Dynamic allocation is simulated by a pointer to the static object */
  DeviceDataPrv = &DeviceDataPrv__DEFAULT_RTOS_ALLOC;
  /* Save RTOS Device structure */
  DeviceDataPrv->UserData = UserDataPtr; /* Store the RTOS device structure */
  /* GPIOB_PDOR: PDO&=~0x00200000 */
  GPIOB_PDOR &= (uint32_t)~(uint32_t)(GPIO_PDOR_PDO(0x00200000));
  /* GPIOB_PDDR: PDD|=0x00200000 */
  GPIOB_PDDR |= GPIO_PDDR_PDD(0x00200000);
  /* Registration of the device structure */
  PE_LDD_RegisterDeviceStructure(PE_LDD_COMPONENT_GPIO1_ID,DeviceDataPrv);
  return ((LDD_TDeviceData *)DeviceDataPrv);
}
开发者ID:51104271,项目名称:CW_FRDM-KE06Z,代码行数:18,代码来源:GPIO1.c


示例13: BitIO_UPRDY_Init

/* ===================================================================*/
LDD_TDeviceData* BitIO_UPRDY_Init(LDD_TUserData *UserDataPtr)
{
  /* Configure pin as output */
  /* GPIOE_PDDR: PDD|=0x20000000 */
  GPIOE_PDDR |= GPIO_PDDR_PDD(0x20000000);
  /* Set initialization value */
  /* GPIOE_PDOR: PDO|=0x20000000 */
  GPIOE_PDOR |= GPIO_PDOR_PDO(0x20000000);
  /* Initialization of Port Control register */
  /* PORTE_PCR29: ISF=0,MUX=1 */
  PORTE_PCR29 = (uint32_t)((PORTE_PCR29 & (uint32_t)~(uint32_t)(
                 PORT_PCR_ISF_MASK |
                 PORT_PCR_MUX(0x06)
                )) | (uint32_t)(
                 PORT_PCR_MUX(0x01)
                ));
  return ERR_OK;
}
开发者ID:wishinsoul,项目名称:semg_mkl25z128vlh4,代码行数:19,代码来源:BitIO_UPRDY.c


示例14: MB_DTR_Init

/* ===================================================================*/
LDD_TDeviceData* MB_DTR_Init(LDD_TUserData *UserDataPtr)
{
  /* Allocate device structure */
  MB_DTR_TDeviceDataPtr DeviceDataPrv;

  /* {MQXLite RTOS Adapter} Driver memory allocation: Dynamic allocation is simulated by a pointer to the static object */
  DeviceDataPrv = &DeviceDataPrv__DEFAULT_RTOS_ALLOC;
  DeviceDataPrv->UserDataPtr = UserDataPtr; /* Store the RTOS device structure */
  /* Configure pin as output */
  /* GPIOA_PDDR: PDD|=0x20000000 */
  GPIOA_PDDR |= GPIO_PDDR_PDD(0x20000000);
  /* Set initialization value */
  /* GPIOA_PDOR: PDO&=~0x20000000 */
  GPIOA_PDOR &= (uint32_t)~(uint32_t)(GPIO_PDOR_PDO(0x20000000));
  /* Registration of the device structure */
  PE_LDD_RegisterDeviceStructure(PE_LDD_COMPONENT_MB_DTR_ID,DeviceDataPrv);
  return ((LDD_TDeviceData *)DeviceDataPrv);
}
开发者ID:51104271,项目名称:CW_FRDM-KE06Z,代码行数:19,代码来源:MB_DTR.c


示例15: cam_isr

void cam_isr() {
	// clear interrupt flag
	FTM2_C0SC;
	FTM2_C0SC &= ~(0x80u);
	
	// send SI low
	GPIOA_PCOR |= GPIO_PDOR_PDO(GPIO_PIN(14));
	
	// run ADC on data input for 128 pixels
	if (cam_clockCounter < 128) {
		cam_clockCounter++;
		adc_start();
	} else {
		// disable interrupt
		disable_irq(64);
		
		cam_clockCounter = 0;
		FTM2_C0V = 0;
		cam_flag = EXEC_FLAG_DOWN;
	}	
}
开发者ID:kchapdaily,项目名称:alfc,代码行数:21,代码来源:cam.c


示例16: SPI_CS_assert

/*********************************************************
* Name: SPI_CS_assert
* Desc: Change SPI_CS pin state
* Parameter: expected state
* Return: None
**********************************************************/
void SPI_CS_assert(uint_8 state)
{
    /*Body*/   
    GPIOE_PDDR |= GPIO_PDDR_PDD(4);
    GPIOE_PDOR |= GPIO_PDOR_PDO(state);
}/*EndBody*/   
开发者ID:Adilla,项目名称:openwsn-fw,代码行数:12,代码来源:SPI_kinetis.c


示例17: LCD_Init_Oled

void LCD_Init_Oled(void)        
{
        //设置PORTA pin14,pin15为GPIO口 
//	PORTC_PCR12=(0|PORT_PCR_MUX(1));
//	PORTC_PCR13=(0|PORT_PCR_MUX(1)); 
//	PORTC_PCR14=(0|PORT_PCR_MUX(1));
//	PORTC_PCR15=(0|PORT_PCR_MUX(1)); 
        
        PORTE_PCR24=(0|PORT_PCR_MUX(1));
	PORTA_PCR14=(0|PORT_PCR_MUX(1)); 
	PORTE_PCR25=(0|PORT_PCR_MUX(1));
	PORTA_PCR16=(0|PORT_PCR_MUX(1)); 
	
	//设置PORTA pin14,pin15为输出方向;pin16,pin17为输入方向
//	GPIOC_PDDR=GPIO_PDDR_PDD(GPIO_PIN(12)|GPIO_PIN(13)|GPIO_PIN(14)|GPIO_PIN(15));
        GPIOA_PDDR=GPIO_PDDR_PDD(GPIO_PIN(14)|GPIO_PIN(16));
	
        GPIOE_PDDR=GPIO_PDDR_PDD(GPIO_PIN(24)|GPIO_PIN(25));
//	GPIOC_PDOR |=  GPIO_PDOR_PDO(GPIO_PIN(12));
//	//LCD_CS=1;	//预制SLK和SS为高电平   	
//	
//	GPIOC_PDOR &= ~GPIO_PDOR_PDO(GPIO_PIN(14));
//	LCD_DLY_ms(50);
//	GPIOC_PDOR |=  GPIO_PDOR_PDO(GPIO_PIN(14));
        GPIOE_PDOR |=  GPIO_PDOR_PDO(GPIO_PIN(25));
	//LCD_CS=1;	//预制SLK和SS为高电平   	
	
	GPIOA_PDOR &= ~GPIO_PDOR_PDO(GPIO_PIN(14));
	LCD_DLY_ms(50);
	GPIOA_PDOR |=  GPIO_PDOR_PDO(GPIO_PIN(14));

  LCD_WrCmd(0xae);//--turn off oled panel
  LCD_WrCmd(0x00);//---set low column address
  LCD_WrCmd(0x10);//---set high column address
  LCD_WrCmd(0x40);//--set start line address  Set Mapping RAM Display Start Line (0x00~0x3F)
  LCD_WrCmd(0x81);//--set contrast control register
  LCD_WrCmd(0xcf); // Set SEG Output Current Brightness
  LCD_WrCmd(0xa1);//--Set SEG/Column Mapping     0xa0左右反置 0xa1正常
  LCD_WrCmd(0xc8);//Set COM/Row Scan Direction   0xc0上下反置 0xc8正常
  LCD_WrCmd(0xa6);//--set normal display
  LCD_WrCmd(0xa8);//--set multiplex ratio(1 to 64)
  LCD_WrCmd(0x3f);//--1/64 duty
  LCD_WrCmd(0xd3);//-set display offset	Shift Mapping RAM Counter (0x00~0x3F)
  LCD_WrCmd(0x00);//-not offset
  LCD_WrCmd(0xd5);//--set display clock divide ratio/oscillator frequency
  LCD_WrCmd(0x80);//--set divide ratio, Set Clock as 100 Frames/Sec
  LCD_WrCmd(0xd9);//--set pre-charge period
  LCD_WrCmd(0xf1);//Set Pre-Charge as 15 Clocks & Discharge as 1 Clock
  LCD_WrCmd(0xda);//--set com pins hardware configuration
  LCD_WrCmd(0x12);
  LCD_WrCmd(0xdb);//--set vcomh
  LCD_WrCmd(0x40);//Set VCOM Deselect Level
  LCD_WrCmd(0x20);//-Set Page Addressing Mode (0x00/0x01/0x02)
  LCD_WrCmd(0x02);//
  LCD_WrCmd(0x8d);//--set Charge Pump enable/disable
  LCD_WrCmd(0x14);//--set(0x10) disable
  LCD_WrCmd(0xa4);// Disable Entire Display On (0xa4/0xa5)
  LCD_WrCmd(0xa6);// Disable Inverse Display On (0xa6/a7) 
  LCD_WrCmd(0xaf);//--turn on oled panel
  LCD_Fill(0x00);  //初始清屏
  LCD_Set_Pos(0,0);  
	
} 
开发者ID:YoshimiSakuka,项目名称:K10,代码行数:63,代码来源:Oled.c



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ GPIO_PIN函数代码示例发布时间:2022-05-30
下一篇:
C++ GPIO_PDD_GetPortDataOutput函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap