LPC824専用プログラム

Dependencies:   Ping SDFileSystem mbed-src

def.h

Committer:
lilac0112_1
Date:
2016-02-25
Revision:
16:f0d3e58b3ca5
Parent:
14:61505c5dbc2b

File content as of revision 16:f0d3e58b3ca5:

#ifndef _DEF_H_
#define _DEF_H_

//4つの内どれか一つを定義する.
//#define SD_CARD
//#define ULTRA_SONIC//HC-SR04
//#define COLOR_SENSOR//S9706→required for changing to S9032
#define IR_SENSOR//MCP3208

#ifdef SD_CARD
    #define BUFSIZE 40
    #define FDATA_NUM 10
#endif /*SD_CARD*/

#ifdef ULTRA_SONIC
    
#endif /*ULTRA_SONIC*/

#ifdef COLOR_SENSOR
    #define SENSOR_NUM 3
    #define COLOR_NUM 3
    #define SENSOR_X_COLOR 9
#endif /*COLOR_SENSOR*/

#ifdef IR_SENSOR
    
    #define IC_NUM 3
    #define IR_NUM 8
    
    #define IR_KEY 0xA
    #define SHORT_SPOT 0
    #define LONG_SPOT 1
    
    #define IR_NOTE_NONE    0x0
    #define IR_NOTE_FAR     0x1
    #define IR_NOTE_CLOSE   0x2
    #define IR_NOTE_CLOSER  0x3
    
    #define DIS_FAR 500
    #define DIS_CLOSE 1000
    #define DIS_MORE_CLOSE 1500
    
    #define START_BIT   0x04
    #define MODE_SINGLE 0x02    // Single-ended mode
    #define MODE_DIFF   0x00    // Differential mode
#endif /*IR_SENSOR*/

#endif