ports.h

Description | Download | Table of Contents | Modules | Compound List | File List | Functions


Overview
Compiler
Documentation
Examples
Misc
Help
IDE & Tools

Download
Install

Links
Projects






00001 /* asm-m68hc12/ports.h -- Definition of 68HC12 ports
00002    Copyright 2000 Free Software Foundation, Inc.
00003    Written by Stephane Carrez (stcarrez@worldnet.fr)
00004 
00005 This file is part of GDB, GAS, and the GNU binutils.
00006 
00007 GDB, GAS, and the GNU binutils are free software; you can redistribute
00008 them and/or modify them under the terms of the GNU General Public
00009 License as published by the Free Software Foundation; either version
00010 1, or (at your option) any later version.
00011 
00012 GDB, GAS, and the GNU binutils are distributed in the hope that they
00013 will be useful, but WITHOUT ANY WARRANTY; without even the implied
00014 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See
00015 the GNU General Public License for more details.
00016 
00017 You should have received a copy of the GNU General Public License
00018 along with this file; see the file COPYING.  If not, write to the Free
00019 Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
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 /* Set the board in the expanded mode to get access to external bus.  */
00040 extern inline void
00041 set_bus_expanded (void)
00042 {
00043   _io_ports[M6811_HPRIO] |= M6811_MDA;
00044 }
00045 
00046 
00047 /* Set the board in single chip mode.  */
00048 extern inline void
00049 set_bus_single_chip (void)
00050 {
00051   _io_ports[M6811_HPRIO] &= ~M6811_MDA;
00052 }
00053 #endif
00054 /* Reset the COP.  */
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 /* Acknowledge the timer interrupt.  */
00071 extern inline void
00072 timer_acknowledge (void)
00073 {
00074   _io_ports[M6812_TFLG2] = M6812_RTIF;
00075 }
00076 
00077 /* Initialize the timer.  */
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 /* _M68HC12_PORTS_H */
00085 

Description | Download | Table of Contents | Modules | Compound List | File List | Functions

    Last modified,
    Apr 16, 2001
[ Copying ]     [ Feedback to Stephane.Carrez@worldnet.fr ]