gonzui


Format: Advanced Search

tkernel_2/kernel/sysinit/src/gdevcnf.cbare sourcepermlink (0.00 seconds)

Search this content:

    1: /*
    2:  *----------------------------------------------------------------------
    3:  *    T-Kernel 2.0 Software Package
    4:  *
    5:  *    Copyright 2011 by Ken Sakamura.
    6:  *    This software is distributed under the latest version of T-License 2.x.
    7:  *----------------------------------------------------------------------
    8:  *
    9:  *    Released by T-Engine Forum(http://www.t-engine.org/) at 2011/05/17.
   10:  *    Modified by T-Engine Forum at 2013/02/26.
   11:  *    Modified by TRON Forum(http://www.tron.org/) at 2015/06/01.
   12:  *
   13:  *----------------------------------------------------------------------
   14:  */
   15: 
   16: /*
   17:  *      gdevcnf.c (sysinit)
   18:  *      DEVCONF access utilities
   19:  */
   20: 
   21: #include "sysinit.h"
   22: #include <device/devconf.h>
   23: #include <sys/sysinfo.h>
   24: #include <libstr.h>
   25: #define DevConfPtr      (SCInfo.devconf)
   26: 
   27: /* Defined in T-Kernel/SM as internal functions */
   28: IMPORT INT getcfn( CONST UB *conf, CONST UB *name, INT *val, INT max );
   29: IMPORT INT getcfs( CONST UB *conf, CONST UB *name, UB *bp, INT max );
   30: 
   31: 
   32: EXPORT  W        GetDevConf(UB *name, W *val)
   33: {
   34:         return getcfn(DevConfPtr, name, (INT*)val, L_DEVCONF_VAL);
   35: }
   36: 
   37: EXPORT  W        GetDevConfStr(UB *name, UB *str)
   38: {
   39:         return getcfs(DevConfPtr, name, str, L_DEVCONF_STR);
   40: }