include/hcs12/asm-m68hc12/ports.h
author Christian Taedcke <hacking@taedcke.com>
Mon, 23 Jan 2012 21:37:22 +0100
changeset 708 1e0a91978826
parent 78 ac05410cc1b8
permissions -rw-r--r--
can_copican_win32:
- renamed project files to include vc10
0
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
     1
/*
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
     2
This file is part of CanFestival, a library implementing CanOpen Stack. 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
     3
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
     4
Copyright (C): Edouard TISSERANT and Francis DUPIN
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
     5
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
     6
See COPYING file for copyrights details.
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
     7
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
     8
This library is free software; you can redistribute it and/or
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
     9
modify it under the terms of the GNU Lesser General Public
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    10
License as published by the Free Software Foundation; either
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    11
version 2.1 of the License, or (at your option) any later version.
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    12
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    13
This library is distributed in the hope that it will be useful,
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    14
but WITHOUT ANY WARRANTY; without even the implied warranty of
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    15
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    16
Lesser General Public License for more details.
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    17
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    18
You should have received a copy of the GNU Lesser General Public
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    19
License along with this library; if not, write to the Free Software
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    20
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    21
*/
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    22
/* m68hc11/ports.h -- Definition of 68HC11 ports
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    23
   Copyright 1999, 2000 Free Software Foundation, Inc.
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    24
   Written by Stephane Carrez (stcarrez@worldnet.fr)
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    25
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    26
This file is part of GDB, GAS, and the GNU binutils.
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    27
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    28
GDB, GAS, and the GNU binutils are free software; you can redistribute
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    29
them and/or modify them under the terms of the GNU General Public
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    30
License as published by the Free Software Foundation; either version
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    31
1, or (at your option) any later version.
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    32
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    33
GDB, GAS, and the GNU binutils are distributed in the hope that they
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    34
will be useful, but WITHOUT ANY WARRANTY; without even the implied
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    35
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    36
the GNU General Public License for more details.
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    37
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    38
You should have received a copy of the GNU General Public License
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    39
along with this file; see the file COPYING.  If not, write to the Free
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    40
Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    41
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    42
78
ac05410cc1b8 compilers compatibility
frdupin
parents: 0
diff changeset
    43
/* Revised francis.dupin@inrets.fr 2003-07 */
0
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    44
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    45
#ifndef _M68HC11_PORTS_H
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    46
#define _M68HC11_PORTS_H
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    47
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    48
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    49
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    50
#include <asm-m68hc12/ports_def.h>
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    51
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    52
/* Prototypes */
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    53
                 unsigned short get_timer_counter (void);
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    54
void             set_timer_counter (unsigned short value);
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    55
void             cop_reset (void);
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    56
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    57
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    58
/* Must me adapted to hc12
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    59
void             timer_acknowledge (void);
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    60
void             timer_initialize_rate (unsigned char divisor);
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    61
void             set_bus_expanded (void);
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    62
void             set_bus_single_chip (void);
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    63
unsigned short * get_input_capture_1 (void);
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    64
void             set_input_capture_1 (unsigned short value);
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    65
unsigned short * get_input_capture_2 (void);
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    66
void             set_input_capture_2 (unsigned short value);
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    67
unsigned short * get_input_capture_3 (void);
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    68
void             set_input_capture_3 (unsigned short value);
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    69
unsigned short * get_output_compare_1 (void);
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    70
void             set_output_compare_1 (unsigned short value);
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    71
unsigned short * get_output_compare_2 (void);
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    72
void             set_output_compare_2 (unsigned short value);
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    73
unsigned short * get_output_compare_3 (void);
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    74
void             set_output_compare_3 (unsigned short value);
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    75
unsigned short * get_output_compare_4 (void);
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    76
void             set_output_compare_4 (unsigned short value);
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    77
unsigned short * get_output_compare_5 (void);
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    78
void             set_output_compare_5 (unsigned short value);
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    79
*/
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    80
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    81
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    82
extern inline unsigned short
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    83
get_timer_counter (void)
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    84
{
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    85
  return ((unsigned volatile short*) &_io_ports[TCNTH])[0];
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    86
}
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    87
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    88
extern inline void
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    89
set_timer_counter (unsigned short value)
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    90
{
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    91
  ((unsigned volatile short*) &_io_ports[TCNTH])[0] = value;
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    92
}
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    93
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    94
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    95
/* Reset the COP.  */
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    96
extern inline void
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    97
cop_reset (void)
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    98
{
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    99
  _io_ports[ARMCOP] = 0x55;
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   100
  _io_ports[ARMCOP] = 0xAA;
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   101
}
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   102
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   103
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   104
#if 0
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   105
/* Acknowledge the timer interrupt.  */
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   106
extern inline void
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   107
timer_acknowledge (void)
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   108
{
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   109
  _io_ports[TFLG2] = 0x80;
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   110
}
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   111
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   112
/* Initialize the timer.  */
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   113
extern inline void
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   114
timer_initialize_rate (unsigned char divisor)
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   115
{
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   116
  _io_ports[M6811_TMSK2] = M6811_RTII | divisor;
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   117
}
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   118
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   119
extern inline void
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   120
cop_optional_reset (void)
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   121
{
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   122
#if defined(M6811_USE_COP) && M6811_USE_COP == 1
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   123
  cop_reset ();
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   124
#endif
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   125
}
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   126
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   127
/* Set the board in the expanded mode to get access to external bus.  */
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   128
extern inline void
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   129
set_bus_expanded (void)
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   130
{
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   131
  _io_ports[M6811_HPRIO] |= M6811_MDA;
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   132
}
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   133
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   134
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   135
/* Set the board in single chip mode.  */
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   136
extern inline void
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   137
set_bus_single_chip (void)
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   138
{
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   139
  _io_ports[M6811_HPRIO] &= ~M6811_MDA;
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   140
}
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   141
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   142
extern inline unsigned short
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   143
get_input_capture_1 (void)
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   144
{
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   145
  return ((unsigned volatile short*) &_io_ports[M6811_TIC1_H])[0];
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   146
}
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   147
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   148
extern inline void
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   149
set_input_capture_1 (unsigned short value)
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   150
{
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   151
  ((unsigned volatile short*) &_io_ports[M6811_TIC1_H])[0] = value;
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   152
}
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   153
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   154
extern inline unsigned short
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   155
get_input_capture_2 (void)
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   156
{
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   157
  return ((unsigned volatile short*) &_io_ports[M6811_TIC2_H])[0];
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   158
}
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   159
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   160
extern inline void
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   161
set_input_capture_2 (unsigned short value)
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   162
{
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   163
  ((unsigned volatile short*) &_io_ports[M6811_TIC2_H])[0] = value;
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   164
}
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   165
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   166
extern inline unsigned short
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   167
get_input_capture_3 (void)
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   168
{
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   169
  return ((unsigned volatile short*) &_io_ports[M6811_TIC3_H])[0];
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   170
}
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   171
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   172
extern inline void
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   173
set_input_capture_3 (unsigned short value)
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   174
{
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   175
  ((unsigned volatile short*) &_io_ports[M6811_TIC3_H])[0] = value;
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   176
}
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   177
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   178
/* Get output compare 16-bit register.  */
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   179
extern inline unsigned short
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   180
get_output_compare_1 (void)
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   181
{
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   182
  return ((unsigned volatile short*) &_io_ports[M6811_TOC1_H])[0];
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   183
}
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   184
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   185
extern inline void
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   186
set_output_compare_1 (unsigned short value)
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   187
{
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   188
  ((unsigned volatile short*) &_io_ports[M6811_TOC1_H])[0] = value;
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   189
}
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   190
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   191
extern inline unsigned short
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   192
get_output_compare_2 (void)
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   193
{
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   194
  return ((unsigned volatile short*) &_io_ports[M6811_TOC2_H])[0];
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   195
}
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   196
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   197
extern inline void
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   198
set_output_compare_2 (unsigned short value)
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   199
{
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   200
  ((unsigned volatile short*) &_io_ports[M6811_TOC2_H])[0] = value;
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   201
}
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   202
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   203
extern inline unsigned short
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   204
get_output_compare_3 (void)
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   205
{
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   206
  return ((unsigned volatile short*) &_io_ports[M6811_TOC3_H])[0];
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   207
}
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   208
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   209
extern inline void
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   210
set_output_compare_3 (unsigned short value)
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   211
{
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   212
  ((unsigned volatile short*) &_io_ports[M6811_TOC3_H])[0] = value;
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   213
}
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   214
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   215
extern inline unsigned short
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   216
get_output_compare_4 (void)
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   217
{
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   218
  return ((unsigned volatile short*) &_io_ports[M6811_TOC4_H])[0];
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   219
}
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   220
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   221
extern inline void
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   222
set_output_compare_4 (unsigned short value)
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   223
{
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   224
  ((unsigned volatile short*) &_io_ports[M6811_TOC4_H])[0] = value;
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   225
}
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   226
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   227
extern inline unsigned short
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   228
get_output_compare_5 (void)
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   229
{
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   230
  return ((unsigned volatile short*) &_io_ports[M6811_TOC5_H])[0];
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   231
}
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   232
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   233
extern inline void
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   234
set_output_compare_5 (unsigned short value)
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   235
{
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   236
  ((unsigned volatile short*) &_io_ports[M6811_TOC5_H])[0] = value;
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   237
}
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   238
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   239
#endif
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   240
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   241
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   242
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   243
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   244
#endif /* _M68HC11_PORTS_H */
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   245