/* * input_int.h * * Created on: 2016/11/24 * Author: takayun */ #ifndef SWITCHES_INT_H_ #define SWITCHES_INT_H_ /************************************************** * Defines **************************************************/ #define switches (volatile int *) 0x0002090 #define push_switches (volatile char *) 0x0002080 struct sw_block{ unsigned char run_mode : 1; unsigned char rw_mode : 1; unsigned char program_selecter : 4; unsigned char register_index : 4; unsigned char memory_index : 4; unsigned char instruction_code : 4; }; typedef union { int data; struct sw_block sw; } sw_t; /************************************************** * Variables **************************************************/ extern unsigned char PUSH_EVENT; /************************************************** * Functions **************************************************/ /* Function: in_int * Sammary: * 全ての入力割り込みを行う * */ void in_int(); void push_int(); #endif /* SWITCHES_INT_H_ */