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);

  • 相关阅读:
    判断奇偶
    数据库中去重时:建议使用group by
    将博客搬至CSDN
    FileZilla
    Windows通过VNC连接并显示Linux桌面(Ubuntu16.04)
    springMVC 中参数绑定
    get和post的区别主要有以下几方面
    Get、Post、Put与Delete的区别
    HTTP请求地址映射
    Spring MVC 框架
  • 原文地址:https://www.cnblogs.com/Viewsky/p/4567832.html
Copyright © 2011-2022 走看看