zoukankan      html  css  js  c++  java
  • 电梯开关量GPIO配置记录

    out_bytes[i] = udp_server_databuf_receive[i];
    }
    speex_bits_reset(&bitsDecode);
    speex_bits_read_from(&bitsDecode, (char *)out_bytes, ENCODED_FRAME_SIZE);

    /*ÏÂÃæµÄ·½Ê½ÊÇͨ¹ýÖ±½Ó²Ù×÷¿âº¯Êý·½Ê½¶ÁÈ¡IO*/
    #define KEY0 GPIO_ReadInputDataBit(GPIOE,GPIO_Pin_4) //PE4
    #define KEY1 GPIO_ReadInputDataBit(GPIOE,GPIO_Pin_3) //PE3
    #define KEY2 GPIO_ReadInputDataBit(GPIOE,GPIO_Pin_2) //PE2
    #define WK_UP GPIO_ReadInputDataBit(GPIOA,GPIO_Pin_0) //PA0


    /*ÏÂÃæ·½Ê½ÊÇͨ¹ýλ´ø²Ù×÷·½Ê½¶ÁÈ¡IO*/
    /*
    #define KEY0 PEin(4) //PE4
    #define KEY1 PEin(3) //PE3
    #define KEY2 PEin(2) //P32
    #define WK_UP PAin(0) //PA0
    */

    总接触器 PE5  

    安全回路PE6

    检修状态PG6

    闸瓦温度PG7

    基层PB1

    极限PB2

    上平层PB6

    下平层PB7

    电梯门PB10

    备用门PB11

    人体红外探测PD6

    轿顶漏水PD2

    轿厢按钮  //、key0 默认低电平有效

    GPIO_InitTypeDef GPIO_InitStructure;

    RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOF, ENABLE);


    GPIO_InitStructure.GPIO_Pin = GPIO_Pin_6;
    GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN;

    GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL;

    GPIO_InitStructure.GPIO_Speed = GPIO_Speed_100MHz;//100MHz
    GPIO_Init(GPIOF, &GPIO_InitStructure);

     GPIO_InitStructure.GPIO_Pin = GPIO_Pin_7;

    GPIO_InitStructure.GPIO_Mode = GPIO_Mode_OUT;

    GPIO_InitStructure.GPIO_OType = GPIO_OType_PP;


    GPIO_Init(GPIOF, &GPIO_InitStructure);

  • 相关阅读:
    2018-9-4-Roslyn-通过-nuget-统一管理信息
    2018-9-4-Roslyn-通过-nuget-统一管理信息
    省赛前最后一次总结
    省赛前最后一次总结
    POJ 1845-Sumdiv(厉害了这个题)
    POJ 1845-Sumdiv(厉害了这个题)
    DP背包(一)
    DP背包(一)
    训练记录
    训练记录
  • 原文地址:https://www.cnblogs.com/Viewsky/p/4567832.html
Copyright © 2011-2022 走看看