Ignore:
Timestamp:
Apr 5, 2019, 9:26:53 PM (5 years ago)
Author:
coas-nagasima
Message:

mbed関連を更新
シリアルドライバをmbedのHALを使うよう変更
ファイルディスクリプタの処理を更新

Location:
asp3_tinet_ecnl_rx/trunk/asp3_dcre/tecsgen/tecs/mruby
Files:
10 added
3 edited

Legend:

Unmodified
Added
Removed
  • asp3_tinet_ecnl_rx/trunk/asp3_dcre/tecsgen/tecs/mruby/TECSPointer.h

    r359 r374  
    102102        {                                                                                                                                       \
    103103                if( sizeof( type ) > sizeof( mrb_int ) ){                                               \
    104                         if( val >= (((type)1) << (sizeof(mrb_int)*8-1))                         \
    105                                 || val < -(((type)1) << (sizeof(mrb_int)*8-1)) )                \
     104                        if( val > TYPE ## _MAX                          \
     105                                || val < TYPE ## _MIN )         \
    106106                                /* '=' unecessary for negative value    */                              \
    107107                                /* ignore warning on int32_t */                                                 \
     
    126126        {                                                                                                                                       \
    127127                if( sizeof( type ) > sizeof( mrb_int ) ){                                               \
    128                         if( val >= (((type)1) << (sizeof(mrb_int)*8)))                          \
     128      if( val > TYPE ## _MAX )                        \
    129129                                /* '=' unecessary for negative value    */                              \
    130130                                /* ignore warning on int32_t */                                                 \
  • asp3_tinet_ecnl_rx/trunk/asp3_dcre/tecsgen/tecs/mruby/mrubyVMs.cdl

    r359 r374  
    3737
    3838/*
    39  * tools/mruby/mruby.c から cInit_initializeBridge( mrb ) を呼び出すように変更したもの
     39 * POSIX 環境用の VM
     40 * mrbgems の mrbgems/mruby-bin-mruby/tools/mruby/mruby.c を参考に作成したもの
    4041 */
    4142namespace nMruby{
  • asp3_tinet_ecnl_rx/trunk/asp3_dcre/tecsgen/tecs/mruby/tecs_mruby.h

    r359 r374  
    11/*
    2  *  Copyright (C) 2008-2017 by TOPPERS Project
     2 *  Copyright (C) 2008-2019 by TOPPERS Project
    33 *
    44 *  上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ
     
    4646#include "mruby/irep.h"
    4747#include "mruby/dump.h"
     48#include "mruby/proc.h"
    4849
    4950#include "TECSPointer.h"
    5051#include "TECSStruct.h"
    5152
    52 #if  ! defined( MRUBY_RELEASE_MAJOR ) || MRUBY_RELEASE_MAJOR == 1 && MRUBY_RELEASE_MINOR < 2
    53 #ifndef MRB_ARGS_REQ
    54 #define MRB_ARGS_REQ(n)     ARGS_REQ(n)
    55 #define MRB_ARGS_OPT(n)     ARGS_OPT(n)
    56 #define MRB_ARGS_ARG(n1,n2) ARGS_ARG(n1,n2)
    57 #define MRB_ARGS_REST()     ARGS_REST()
    58 #define MRB_ARGS_POST(n)    ARGS_POST(n)
    59 #define MRB_ARGS_KEY(n1,n2) ARGS_KEY(n1,n2)
    60 #define MRB_ARGS_BLOCK()    ARGS_BLOCK()
    61 #define MRB_ARGS_ANY()      ARGS_ANY()
    62 #define MRB_ARGS_NONE()     ARGS_NONE()
    63 #endif /* MRB_ARGS_REQ */
    64 #endif
    6553
    66 #if  ! defined( MRUBY_RELEASE_MAJOR )
    67 #define mrb_float_value( mrb, val )  mrb_float_value( val )
    68 #endif
    69 
    70 #else
     54#else /* TECSGEN */
    7155
    7256/*
    73  * fake tecsgen because tecsgen cannot accept actual mruby.h in case of below.
     57 * fake definition because tecsgen cannot accept actual mruby.h in case of below.
    7458 *   types:   long long, long long int
    7559 *   special keyword __attribute__(x), __extension__
     
    7862typedef int mrb_irep;
    7963typedef int mrb_context;
    80 struct  RClass {int dummy;};
    81 struct  RProc  {int dummy;};
     64struct  RClass {uint32_t gcnext;};  // actual definition: struct RBasic *gcnext
     65struct  RProc  {uint32_t gcnext;};  // actual definition: struct RBasic *gcnext
    8266
    8367typedef int CELLCB;
     68
     69#define GET_SET_BOOL( Type, type )
     70#define GET_SET_CHAR( Type, type )
     71#define GET_SET_INT( Type, type )
     72#define GET_SET_FLOAT( Type, type )
     73#define POINTER_CLASS( Type, type )
     74#define CHECK_AND_GET_POINTER( Type, type )
    8475
    8576#endif /* TECSGEN */
Note: See TracChangeset for help on using the changeset viewer.