#i nclude <GLOBAL.h> #i nclude <stdlib.h> #i nclude <stdbool.h> #i nclude <msp430x41x.h> //------------------------------------------------------------------------------ #define SysPowerDirOut P1DIR |= BIT2 #define SysPowerClos P1OUT |= BIT2 #define SysPowerOpen P1OUT &= ~BIT2 #define SysSclDirOut P1DIR |= BIT1 #define SysSclDirIn P1DIR &=~ BIT1 #define SysSclHig P1OUT |= BIT1 #define SysSclLow P1OUT &=~ BIT1 #define SysScl BIT1 //------------------------------------------------------------------------------ #define CpuCardRstDirOut P1DIR |= BIT0 #define CpuCardRstDirIn P1DIR &=~ BIT0 #define CpuCardRstHig P1OUT |= BIT0 #define CpuCardRstLow P1OUT &=~ BIT0 #define CpuCardSdaDirOut P1DIR |= BIT5 #define CpuCardSdaDirIn P1DIR &=~ BIT5 #define CpuCardSdaHig P1OUT |= BIT5 #define CpuCardSdaLow P1OUT &=~ BIT5 #define CpuCardSdaInSt P1IN & BIT5 //------------------------------------------------------------------------------ #define EasmChipRstDirOut P6DIR |= BIT0 #define EasmChipRstDirIn P6DIR &=~ BIT0 #define EasmChipRstHig P6OUT |= BIT0 #define EasmChipRstLow P6OUT &=~ BIT0 #define EasmChipSdaDirOut P6DIR |= BIT1 #define EasmChipSdaDirIn P6DIR &=~ BIT1 #define EasmChipSdaHig P6OUT |= BIT1 #define EasmChipSdaLow P6OUT &=~ BIT1 #define EasmChipSdaInSt P6IN & BIT1 //------------------------------------------------------------------------------ #define CLA 0 #define INS 1 #define P01 2 #define P02 3 #define P03 4 #define F01 5 #define F02 6 #define CardChkDirSt P1IN & BIT4 #define CardChkDirIn P1DIR &=~ BIT4 #define CardChkSt BIT4