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

  • 相关阅读:
    (转)【web前端培训之前后端的配合(中)】继续昨日的故事
    ural(Timus) 1136. Parliament
    scau Josephus Problem
    ACMICPC Live Archive 6204 Poker End Games
    uva 10391 Compound Words
    ACMICPC Live Archive 3222 Joke with Turtles
    uva 10132 File Fragmentation
    uva 270 Lining Up
    【转】各种字符串哈希函数比较
    uva 10905 Children's Game
  • 原文地址:https://www.cnblogs.com/Viewsky/p/4567832.html
Copyright © 2011-2022 走看看