static void init(void) { String_init(); File_init(); }
bool SjSee::Execute(const wxString& script__) { wxASSERT( !m_executionScope.IsEmpty() ); // very first, do some garbarge collection (if needed) // this must be done _before_ we create SjGcLocker /*if( SjGcNeedsCleanup() ) { SjGcCleanup(); -- done in SjGcLocker }*/ // lock the garbage collector SjGcLocker gclocker; // init the interpreter, if not yet done if( !m_interprInitialized ) { // init some global function pointers static bool SEE_system_initialized = false; if( !SEE_system_initialized ) { SEE_system.abort = SjSee_abort; SEE_system.malloc = SjSee_malloc; SEE_system.malloc_string = SjSee_malloc_string; SEE_system.malloc_finalize = SjSee_malloc_finalize; SEE_system.free = SjSee_free; SEE_system_initialized = true; SEE_system_add_my_strings (); } // init the interpreter instance and our objects SEE_interpreter_init(m_interpr); Player_init(); Program_init(); Rights_init(); Dialog_init(); Database_init(); File_init(); HttpRequest_init(); m_interprInitialized = true; } // do what to do bool success = true; SEE_input* input; SEE_try_context_t tryContext; /* Create an input stream that provides program text */ { wxString script(script__); if( script.Find(wxT("\r")) != -1 ) // no "\r" - otherwise, the line numbers get out of order { if( script.Find(wxT("\n")) != -1 ) script.Replace(wxT("\r"), wxT(" ")); else script.Replace(wxT("\r"), wxT("\n")); } input = SEE_input_string(m_interpr, WxStringToSeeString(m_interpr, script)); } /* Establish an exception context */ SEE_TRY(m_interpr, tryContext) { /* Call the program evaluator */ SEE_Global_eval(m_interpr, input, m_executeResult); }
void main(void) { ICR = 0xff2e; /* IDLE Control Register */ /* mem port, io port and cpu idle active */ /* Peripheral_Reset */ CSL_SYSCTRL_REGS->PSRCR = 0x0020; CSL_SYSCTRL_REGS->PRCR = 0x00bf; EZDSP5535_waitusec(5); /* Peripheral Clock Gating Configuration Register1 0: active, 1: disable SYSCLKDIS I2S2 TMR2 TMR1 X TMR0 I2S1 I2S0 MMCSD1 I2C X MMCSD0 DMA0 UART SPI I2S3 */ CSL_SYSCTRL_REGS->PCGCR1 = 0x0000; /* Peripheral Clock Gating Configuration Register2 X X X X X X X X X X ANAREG DMA3 DMA2 DMA1 USB SAR LCD */ CSL_SYSCTRL_REGS->PCGCR2 = 0x0000; /* VERY IMPORTANT !!! */ /* PPMODE1 (SPI, GPIO, UART, and I2S2): 7 signals of the SPI module, 6 GPIO signals(GP[17:12]), 4 signals of the UART module, 4 signals of the I2S2 module SP1MODE2 (GP[11:6]). 6 GPIO signals (GP[11:6]) SP0MODE0 (MMC/SD0). All 6 signals of the MMC/SD0 */ CSL_SYSCTRL_REGS->EBSR = (CSL_SYS_EBSR_PPMODE_MODE1 << 12) |(CSL_SYS_EBSR_SP1MODE_MODE2 << 10) |(CSL_SYS_EBSR_SP0MODE_MODE0 << 8); asm(" bit(ST1, #ST1_INTM) = #1"); PLL_init(200000000); /* 100MHz */ INTR_init(); /* set Interrupt vector and clean all IRs */ TIMER_init(); /* Timer interrupt */ EZDSP5535_GPIO_init(); /* Enable GPIO LED */ // RTC_reset(); EZDSP5535_I2C_init(); /* Initialize I2C */ EZDSP5535_UART_init(); /* Initialize UART */ Audio_init(7); /* Initialise set to BandWidth=7kHz */ File_init(); EZDSP5535_LCD_init(); /* Initialise LCD */ LCD_print("G722.1 recorder", 0); LCD_print("start", 1); SCHEDULE_init(); BoardUSB_init(); asm(" bit(ST1, #ST1_INTM) = #0"); while(1) { while(taskList) { audioProcessing(); uartProcessing(); alarmProcessing(); usbProcessing(); } asm(" idle"); } }