亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

蟲蟲首頁| 資源下載| 資源專輯| 精品軟件
登錄| 注冊

ifndef

  • 關(guān)于 linux密鑰的一些安全介紹 #ifndef COMMON_H #define COMMON_H #define MY_PROC_INTERFACE "/proc/learning

    關(guān)于 linux密鑰的一些安全介紹 #ifndef COMMON_H #define COMMON_H #define MY_PROC_INTERFACE "/proc/learning-key/gateway" #define FRESH_SESSION _IO( C ,1) #define SUCCESS 0 #define FAILURE 1 #endif

    標簽: COMMON_H define MY_PROC_INTERFACE learning

    上傳時間: 2015-11-19

    上傳用戶:葉山豪

  • 頭件的中的#ifndef

    頭件的中的#ifndef,這是一個很關(guān)鍵的東西。比如你有兩個C文件,這兩個C文件都include了同一個頭文件。而編譯時,這兩個C文件要一同編譯成一個可運行文件,于是問題來了

    標簽: ifndef

    上傳時間: 2016-09-07

    上傳用戶:離殤

  • 51單片機實現(xiàn)的RS485通訊程序

      #ifndef __485_C__   #define __485_C__   #include   #include   #define unsigned char uchar   #define unsigned int uint   /* 通信命令 */   #define __ACTIVE_ 0x01 // 主機詢問從機是否存在   #define __GETDATA_ 0x02 // 主機發(fā)送讀設(shè)備請求   #define __OK_ 0x03 // 從機應(yīng)答   #define __STATUS_ 0x04 // 從機發(fā)送設(shè)備狀態(tài)信息   #define __MAXSIZE 0x08 // 緩沖區(qū)長度   #define __ERRLEN 12 // 任何通信幀長度超過12則表示出錯   uchar dbuf[__MAXSIZE]; // 該緩沖區(qū)用于保存設(shè)備狀態(tài)信息   uchar dev; // 該字節(jié)用于保存本機設(shè)備號   sbit M_DE = P1^0; // 驅(qū)動器使能,1有效   sbit M_RE = P1^1; // 接收器使能,0有效

    標簽: 485 RS 51單片機 通訊程序

    上傳時間: 2014-12-26

    上傳用戶:604759954

  • 16 16點陣顯示漢字原理及顯示程序

    16 16點陣顯示漢字原理及顯示程序 #include "config.h" #define                DOTLED_LINE_PORT        PORTB #define                DOTLED_LINE_DDR                DDRB #define                DOTLED_LINE_PIN                PINB #define                DOTLED_LINE_SCKT        PB1 #define                DOTLED_LINE_SCKH        PB5 #define                DOTLED_LINE_SDA                PB3 #define                DOTLED_ROW_PORT                PORTC #define                DOTLED_ROW_DDR                DDRC #define                DOTLED_ROW_PIN                PINC #define                DOTLED_ROW_A0                PC0 #define                DOTLED_ROW_A1                PC1 #define                DOTLED_ROW_A2                PC2 #define                DOTLED_ROW_A3                PC3 #define                DOTLED_ROW_E                PC4 uint8 font[] = { /*--  調(diào)入了一幅圖像:這是您新建的圖像  --*/ /*--  寬度x高度=16x16  --*/ 0x00,0x00,0x00,0x00,0x08,0x38,0x18,0x44,0x08,0x44,0x08,0x04,0x08,0x08,0x08,0x10, 0x08,0x20,0x08,0x40,0x08,0x40,0x08,0x40,0x3E,0x7C,0x00,0x00,0x00,0x00,0x00,0x00 }; static void TransmitByte(uint8 byte); static void SelectRow(uint8 row); static void FlipLatchLine(void); static void TransmitByte(uint8 byte) {         uint8 i;                  for(i = 0 ; i < 8 ; i ++)         {                 if(byte & (1 << i))                 {                         DOTLED_LINE_PORT |= _BV(DOTLED_LINE_SDA);                 }                 else                 {                         DOTLED_LINE_PORT &= ~_BV(DOTLED_LINE_SDA);                 }                 //__delay_cycles(100);                 DOTLED_LINE_PORT |= _BV(DOTLED_LINE_SCKH);                 //__delay_cycles(100);                 DOTLED_LINE_PORT &= ~_BV(DOTLED_LINE_SCKH);                 //__delay_cycles(100);         } } static void SelectRow(uint8 row) {           //row -= 1;         row |= DOTLED_ROW_PIN & 0xe0;         DOTLED_ROW_PORT = row; } static void FlipLatchLine(void) {         DOTLED_LINE_PORT |= _BV(DOTLED_LINE_SCKT);         DOTLED_LINE_PORT &= ~_BV(DOTLED_LINE_SCKT); } void InitDotLedPort(void) {         DOTLED_LINE_PORT &= ~(_BV(DOTLED_LINE_SCKT) | _BV(DOTLED_LINE_SCKH));         DOTLED_LINE_PORT |= _BV(DOTLED_LINE_SDA);         DOTLED_LINE_DDR |= _BV(DOTLED_LINE_SCKT) | _BV(DOTLED_LINE_SCKH) | _BV(DOTLED_LINE_SDA);                  DOTLED_ROW_PORT |= 0x1f;         DOTLED_ROW_PORT &= 0xf0;         DOTLED_ROW_DDR |= 0x1f; } void EnableRow(boolean IsEnable) {         if(IsEnable)         {                 DOTLED_ROW_PORT &= ~_BV(DOTLED_ROW_E);         }         else         {                 DOTLED_ROW_PORT |= _BV(DOTLED_ROW_E);         } } void PrintDotLed(uint8 * buffer) {         uint8 i , tmp;                  for(i = 0 ; i < 16 ; i ++)         {                 tmp = *buffer ++;                 TransmitByte(~tmp);                 tmp = *buffer ++;                 TransmitByte(~tmp);                 SelectRow(i);                 FlipLatchLine();         } } void main(void) {         InitDotLedPort();                  EnableRow(TRUE);                  while(1)         {                 PrintDotLed(font);                 __delay_cycles(5000);         }          } //---------------------------------------------------- config.h文件 #ifndef        _CONFIG_H #define        _CONFIG_H //#define                GCCAVR #define                CPU_CYCLES        7372800L #ifndef                GCCAVR #define                _BV(bit)        (1 << (bit)) #endif #define                MSB                0x80 #define                LSB                0x01 #define                FALSE                0 #define                TRUE                1 typedef                unsigned char        uint8; typedef                unsigned int        uint16; typedef                unsigned long        uint32; typedef                unsigned char        boolean; #include <ioavr.h> #include <inavr.h> #include "dotled.h" #endif //-----

    標簽: 16 點陣顯示 漢字 顯示程序

    上傳時間: 2013-11-18

    上傳用戶:mnacyf

  • 51單片機讀寫u盤(含源程序和原理圖)

    附件有51單片機加上sl811讀寫U盤的源程序和原理圖 /*--------------------------------------------------------------------------AT89X52.H Header file for the low voltage Flash Atmel AT89C52 and AT89LV52.Copyright (c) 1995-1996 Keil Software, Inc.  All rights reserved.--------------------------------------------------------------------------*/ #ifndef AT89X52_HEADER_FILE#define AT89X52_HEADER_FILE 1 /*------------------------------------------------Byte Registers------------------------------------------------*/sfr P0      = 0x80;sfr SP      = 0x81;sfr DPL     = 0x82;sfr DPH     = 0x83;sfr PCON    = 0x87;sfr TCON    = 0x88;sfr TMOD    = 0x89;sfr TL0     = 0x8A;sfr TL1     = 0x8B;sfr TH0     = 0x8C;sfr TH1     = 0x8D;sfr P1      = 0x90;sfr SCON    = 0x98;sfr SBUF    = 0x99;sfr P2      = 0xA0;sfr IE      = 0xA8;sfr P3      = 0xB0;sfr IP      = 0xB8;sfr T2CON   = 0xC8;sfr T2MOD   = 0xC9;sfr RCAP2L  = 0xCA;sfr RCAP2H  = 0xCB;sfr TL2     = 0xCC;sfr TH2     = 0xCD;sfr PSW     = 0xD0;sfr ACC     = 0xE0;sfr B       = 0xF0;

    標簽: 51單片機 讀寫 源程序 原理圖

    上傳時間: 2014-01-05

    上傳用戶:lnnn30

  • I2C總線驅(qū)動程序

    1 /**————————————————————2 〖說明〗I2C總線驅(qū)動程序(用兩個普通IO模擬I2C總線)3 包括100Khz(T=10us)的標準模式(慢速模式)選擇,4 和400Khz(T=2.5us)的快速模式選擇,5 默認11.0592Mhz的晶振。6 〖文件〗PCF8563T.C ﹫2001/11/2 77 〖作者〗龍嘯九天 c51@yeah.net http://www.c51bbs.co /8 〖修改〗修改建議請到論壇公布 http://www.c51bbs.co m9 〖版本〗V1.00A Build 080310 —————————————————————*/1112 #ifndef SDA13 #define SDA P0_014 #define SCL P0_115 #endif1617 extern uchar SystemError;1819 #define uchar unsigned char20 #define uint unsigned int21 #define Byte unsigned char22 #define Word unsigned int23 #define bool bit24 #define true 125 #define false 02627 #define SomeNOP(); _nop_();_nop_();_nop_();_nop_();2829 /**--------------------------------------------------------------------------------30 調(diào)用方式:void I2CStart(void) ﹫2001/07/0 431 函數(shù)說明:私有函數(shù),I2C專用32 ---------------------------------------------------------------------------------*/33 void I2CStart(void)34 {35 EA=0;36 SDA=1; SCL=1; SomeNOP();//INI37 SDA=0; SomeNOP(); //START38 SCL=0;39 }4041 /**--------------------------------------------------------------------------------42 調(diào)用方式:void I2CStop(void) ﹫2001/07/0 443 函數(shù)說明:私有函數(shù),I2C專用44 ---------------------------------------------------------------------------------*/45 void I2CStop(void)46 {47 SCL=0; SDA=0; SomeNOP(); //INI48 SCL=1; SomeNOP(); SDA=1; //STOP49 EA=1;50 }5152 /**--------------------------------------------------------------------------------53 調(diào)用方式:bit I2CAck(void) ﹫2001/07/0 454 函數(shù)說明:私有函數(shù),I2C專用,等待從器件接收方的應(yīng)答55 ---------------------------------------------------------------------------------*/56 bool WaitAck(void)57 {58 uchar errtime=255;//因故障接收方無ACK,超時值為255。59 SDA=1;SomeNOP();60 SCL=1;SomeNOP();61 while(SDA) {errtime--; if (!errtime) {I2CStop();SystemError=0x11;return false;}}62 SCL=0;63 return true;

    標簽: I2C 總線 驅(qū)動程序

    上傳時間: 2014-04-11

    上傳用戶:xg262122

  • 三星lcd驅(qū)動

    三星lcd驅(qū)動,S6B0741,128X129FENBLV#ifndef _LCD_H_ #define _LCD_H_ #include "settings.h" #include "Battery.h" #include "EnDecode.h" #include "main.h"

    標簽: lcd 三星 驅(qū)動

    上傳時間: 2013-12-19

    上傳用戶:tianyi223

  • * TFTP client compatible with RFC-1350 * compile under visiual c++ or borland c++ * author email:

    * TFTP client compatible with RFC-1350 * compile under visiual c++ or borland c++ * author email: yuyushine@163.com ***************************************************/ #define _VC /* if compile under visiual c++ else undefine this*/ #include <stdio.h> #include <winsock.h> #include <conio.h> #ifndef MAKEWORD #define MAKEWORD(l,h) ((WORD)(((BYTE)(l))|(((WORD)(BYTE)(h))<<8))) #endif #define WSA_MAJOR_VERSION 1 #define WSA_MINOR_VERSION 1 #define WSA_VERSION MAKEWORD(WSA_MAJOR_VERSION, WSA_MINOR_VERSION)

    標簽: compatible borland compile visiual

    上傳時間: 2014-01-15

    上傳用戶:yuchunhai1990

  • pid教程

    pid控制 #ifndef _PID_H #ifndef _PID_H #ifdef _PID_C     #define PID_EXT #else     #define PID_EXT extern #endif typedef struct PID {     int SetPoint;          unsigned char BitMove;          float Proportion;     float Integral;     float Derivative;          int iError;     int iIncpid;          int LastError;     int PrevError;          int Uk; }PID,*pPID; PID_EXT PID sPID; PID_EXT pPID sptr; void IncPIDInit(void); int IncPIDCalc(int NextPoint); #endif

    標簽: pid 教程

    上傳時間: 2019-08-02

    上傳用戶:stcwzy

主站蜘蛛池模板: 莱州市| 扶绥县| 康马县| 延吉市| 名山县| 时尚| 罗城| 辰溪县| 晋州市| 孝义市| 遂宁市| 永宁县| 佳木斯市| 贵南县| 闻喜县| 青阳县| 南郑县| 肥城市| 永福县| 深泽县| 依兰县| 西乌珠穆沁旗| 静安区| 泗水县| 玉树县| 遂溪县| 芦溪县| 渭源县| 外汇| 西平县| 游戏| 新余市| 松潘县| 嘉善县| 开鲁县| 宣汉县| 汶上县| 白山市| 郧西县| 钟山县| 凌源市|