mirror of
https://github.com/rvtr/ctr_mcu.git
synced 2025-06-19 00:55:37 -04:00

・TWLに音量変化割り込みを入れまくらない。 ACKとしてのREADを期待せず、変化した分だけ入れる ・歩数計ログをクリア後、1歩目をカウントしたところからログいっぱいで止める &一応リファクタリング 年またぎなど一通りチェックはしたが… ぼちぼちブランチを切る git-svn-id: file:///Volumes/Transfer/gigaleak_20231201/2020-05-23%20-%20ctr.7z%20+%20svn_v1.068.zip/ctr/svn/ctr_mcu@308 013db118-44a6-b54f-8bf7-843cb86687b1
105 lines
1.6 KiB
C
105 lines
1.6 KiB
C
#ifndef __jhl_defs_h__
|
||
#define __jhl_defs_h__
|
||
|
||
typedef unsigned char u8;
|
||
typedef signed char s8;
|
||
typedef unsigned short u16;
|
||
typedef signed short s16;
|
||
|
||
typedef unsigned short ux16;
|
||
typedef signed short sx16;
|
||
|
||
#define true 1
|
||
#define false 0
|
||
|
||
|
||
// typedef unsigned char err;
|
||
|
||
#include "config.h"
|
||
|
||
#define set_bit( cond, reg, pos ) \
|
||
{ \
|
||
if( cond ){ \
|
||
reg |= pos; \
|
||
}else{ \
|
||
reg &= ~pos; \
|
||
} \
|
||
}
|
||
|
||
|
||
# ifdef _WIN32
|
||
// VC‚Ì<E2809A>Ô<EFBFBD>ü‚ð‚Ç‚¤‚É‚©‚·‚é
|
||
|
||
#define bit bool
|
||
|
||
void EI(){};
|
||
void DI(){};
|
||
void HALT(){};
|
||
void NOP(){};
|
||
|
||
#define __interrupt
|
||
#define __far
|
||
|
||
|
||
typedef struct hoge
|
||
{
|
||
unsigned _7 :1;
|
||
unsigned _6 :1;
|
||
unsigned _5 :1;
|
||
unsigned _4 :1;
|
||
unsigned _3 :1;
|
||
unsigned _2 :1;
|
||
unsigned _1 :1;
|
||
unsigned _0 :1;
|
||
}mcu_reg;
|
||
|
||
mcu_reg P0;
|
||
mcu_reg PM0;
|
||
mcu_reg PM1;
|
||
mcu_reg P1;
|
||
mcu_reg P2;
|
||
mcu_reg PM2;
|
||
mcu_reg PM3;
|
||
mcu_reg P3;
|
||
mcu_reg P4;
|
||
mcu_reg P5;
|
||
mcu_reg PM5;
|
||
mcu_reg PU5;
|
||
mcu_reg P7;
|
||
mcu_reg PM7;
|
||
mcu_reg P14;
|
||
mcu_reg PM14;
|
||
mcu_reg PU20;
|
||
mcu_reg PM20;
|
||
mcu_reg P20;
|
||
|
||
unsigned char PMK23;
|
||
unsigned char RTCIMK;
|
||
unsigned char WDTE;
|
||
unsigned char PM2;
|
||
unsigned char PU7;
|
||
|
||
unsigned char WDTE;
|
||
|
||
void EI(){;}
|
||
void DI(){;}
|
||
|
||
unsigned char RWAIT;
|
||
unsigned char RWST;
|
||
|
||
unsigned char bcdtob( unsigned char );
|
||
|
||
unsigned char HOUR;
|
||
unsigned char DAY;
|
||
unsigned char MONTH;
|
||
unsigned char YEAR;
|
||
unsigned char MIN;
|
||
unsigned char SEC;
|
||
|
||
|
||
|
||
|
||
# endif
|
||
|
||
#endif
|