00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef _ASM_M68HC12_PORTS_H
00022 #define _ASM_M68HC12_PORTS_H
00023
00024 #include <asm-m68hc12/ports_def.h>
00025
00026 #if 0
00027 extern inline unsigned short
00028 get_timer_counter (void)
00029 {
00030 return ((unsigned volatile short*) &_io_ports[M6812_TCNT_H])[0];
00031 }
00032
00033 extern inline void
00034 set_timer_counter (unsigned short value)
00035 {
00036 ((unsigned volatile short*) &_io_ports[M6812_TCNT_H])[0] = value;
00037 }
00038
00039
00040 extern inline void
00041 set_bus_expanded (void)
00042 {
00043 _io_ports[M6811_HPRIO] |= M6811_MDA;
00044 }
00045
00046
00047
00048 extern inline void
00049 set_bus_single_chip (void)
00050 {
00051 _io_ports[M6811_HPRIO] &= ~M6811_MDA;
00052 }
00053 #endif
00054
00055 extern inline void
00056 cop_reset (void)
00057 {
00058 _io_ports[M6812_COPRST] = 0x55;
00059 _io_ports[M6812_COPRST] = 0xAA;
00060 }
00061
00062 extern inline void
00063 cop_optional_reset (void)
00064 {
00065 #if defined(M6812_USE_COP) && M6812_USE_COP == 1
00066 cop_reset ();
00067 #endif
00068 }
00069 #if 0
00070
00071 extern inline void
00072 timer_acknowledge (void)
00073 {
00074 _io_ports[M6812_TFLG2] = M6812_RTIF;
00075 }
00076
00077
00078 extern inline void
00079 timer_initialize_rate (unsigned char divisor)
00080 {
00081 _io_ports[M6812_TMSK2] = M6812_RTII | divisor;
00082 }
00083 #endif
00084 #endif
00085