3232#endif
3333
3434#if defined(PICORUBY_SQLITE3 )
35- #define MEMORY_SIZE (1024*190 )
35+ #define MEMORY_SIZE (1024*203 )
3636#else
37- #define MEMORY_SIZE (1024*200 )
37+ #define MEMORY_SIZE (1024*207 )
3838#endif
3939
4040static uint8_t memory_pool [MEMORY_SIZE ];
@@ -57,21 +57,26 @@ tud_msc_write10_complete_cb(uint8_t lun)
5757 autoreload_state = AUTORELOAD_READY ;
5858}
5959
60- #endif /* PICORUBY_NO_MSC */
60+ #endif /* ! PICORUBY_NO_MSC */
6161
6262static void
6363prk_init_picoruby (void )
6464{
65+ mrbc_vm * vm = mrbc_vm_open (NULL );
6566 /* CONST */
6667 mrbc_sym sym_id = mrbc_str_to_symid ("SIZEOF_POINTER" );
6768 mrbc_set_const (sym_id , & mrbc_integer_value (PICORBC_PTR_SIZE ));
68- sym_id = mrbc_str_to_symid ("PICORUBY_NO_MSC" );
69- #ifdef PICORUBY_NO_MSC
70- mrbc_set_const (sym_id , & mrbc_true_value ());
71- #else
72- mrbc_set_const (sym_id , & mrbc_false_value ());
69+ sym_id = mrbc_str_to_symid ("PICORUBY_MSC" );
70+ mrbc_value picoruby_msc = mrbc_string_new_cstr (vm ,
71+ #if defined(PICORUBY_NO_MSC )
72+ "NO_MSC"
73+ #elif defined(PICORUBY_MSC_FLASH )
74+ "MSC_FLASH"
75+ #elif defined(PICORUBY_MSC_SD )
76+ "MSC_SD"
7377#endif
74- mrbc_vm * vm = mrbc_vm_open (NULL );
78+ );
79+ mrbc_set_const (sym_id , & picoruby_msc );
7580 sym_id = mrbc_str_to_symid ("PRK_DESCRIPTION" );
7681 mrbc_value prk_desc = mrbc_string_new_cstr (vm , PRK_DESCRIPTION );
7782 mrbc_set_const (sym_id , & prk_desc );
0 commit comments