gonzui


Format: Advanced Search

mtkernel_3/include/tk/sysdepend/cpu/rx231/syslib.hbare sourcepermlink (0.00 seconds)

Search this content:

    1: /*
    2:  *----------------------------------------------------------------------
    3:  *    micro T-Kernel 3.00.01
    4:  *
    5:  *    Copyright (C) 2006-2020 by Ken Sakamura.
    6:  *    This software is distributed under the T-License 2.2.
    7:  *----------------------------------------------------------------------
    8:  *
    9:  *    Released by TRON Forum(http://www.tron.org) at 2020/05/29.
   10:  *
   11:  *----------------------------------------------------------------------
   12:  */
   13: 
   14: /*
   15:  *      syslib.h
   16:  *
   17:  *      micro T-Kernel System Library  (RX231 depended)
   18:  */
   19: 
   20: #ifndef __TK_SYSLIB_CPU_DEPEND_H__
   21: #define __TK_SYSLIB_CPU_DEPEND_H__
   22: 
   23: #include "../core/rxv2/syslib.h"
   24: 
   25: /*----------------------------------------------------------------------*/
   26: /*
   27:  * Interrupt controller Control
   28:  *
   29:  */
   30: #define IM_LEVEL        0x0004         /* Level trigger */
   31: #define IM_EDGE         0x0000         /* Edge trigger */
   32: 
   33: #define IM_HI           0x0000           /* H level/Interrupt at rising edge */
   34: #define IM_LOW          0x0001          /* L level/Interrupt at falling edge */
   35: #define IM_BOTH         0x0003         /* L level/Interrupt at both edge */
   36: 
   37: /* ------------------------------------------------------------------------ */
   38: /*
   39:  * I/O port access
   40:  *      for memory mapped I/O
   41:  */
   42: Inline void out_w( UW port, UW data )
   43: {
   44:         *(_UW*)port = data;
   45: }
   46: Inline void out_h( UW port, UH data )
   47: {
   48:         *(_UH*)port = data;
   49: }
   50: Inline void out_b( UW port, UB data )
   51: {
   52:         *(_UB*)port = data;
   53: }
   54: 
   55: Inline UW in_w( UW port )
   56: {
   57:         return *(_UW*)port;
   58: }
   59: Inline UH in_h( UW port )
   60: {
   61:         return *(_UH*)port;
   62: }
   63: Inline UB in_b( UW port )
   64: {
   65:         return *(_UB*)port;
   66: }
   67: 
   68: #endif /* __TK_SYSLIB_DEPEND_H__ */