Real2Virtual202111

common.h

٤Ƴ٤Ĥ
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 
 
 
 
 
 
 
 
 
 
-
|
!
 
 
-
!
 
 
 
 
 
-
!
 
 
 
-
!
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
-
!
-
!
 
#pragma once
/****************************************************************************/
/*                                                                          */
/*      STK-7125 �T���v���v���O���� �w�b�_�t�@�C��                          */
/*                                                                          */
/*          Copyright   :: ���A���t�@�v���W�F�N�g                           */
/*          Language    :: SH-C                                             */
/*          File Name   :: common.h                                         */
/*                                                                          */
/****************************************************************************/
//#ifndef       _COMMON_H_
//#define       _COMMON_H_
 
#define PCLK        24000000        // ���ӃN���b�N���g��
 
//#endif        // END _COMMON_H_
 
#define NULL ((void *)0)
#define FaceMax 6
#define DirMax 4
#define IdLenMax 50
#define CMax 128
//#define BitsParChar 10
#define BitsParChar 12
#define SampleIntForDecode0 0x02
#define SampleInterval0 0x04
#define MaxBits SampleInterval0*SampleIntForDecode0*BitsParChar
//#define ReceiveBits SampleInterval0*SampleIntForDecode0*(BitsParChar-1)
#define ReceiveBits SampleInterval0*SampleIntForDecode0*(BitsParChar-3)
#define SampleInterval SampleInterval0*SampleIntForDecode0
#define MaxInterFaceStrLen 125   // <= 15
#include "mbed.h"
 
void xputs(char *x);
void xputc(char x);
void xputd(int x);
void xstrcat(char *x, char*y);
int xdiv(int x, int y);
int xmod(int x, int y);
int xstrlen(char *x);
void xstrcpy(char *x, char *y);
 
char i2h1(int x);
int h2i1(char x);
//void wait(int x);
 
//void initForComBuffer(struct comBuffer *this, unsigned char id);
void hex2str(unsigned char i, unsigned char *s);
 

トップ   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS