int fpu_post_test (int flags) { int fpu = fpu_status (); int ret = 0; WATCHDOG_RESET (); if (!fpu) fpu_enable (); if (ret == 0) ret = fpu_post_test_math1 (); if (ret == 0) ret = fpu_post_test_math2 (); if (ret == 0) ret = fpu_post_test_math3 (); if (ret == 0) ret = fpu_post_test_math4 (); if (ret == 0) ret = fpu_post_test_math5 (); if (ret == 0) ret = fpu_post_test_math6 (); if (ret == 0) ret = fpu_post_test_math7 (); if (!fpu) fpu_disable (); WATCHDOG_RESET (); return ret; }
/* * An "unofficial" function (not exposed in any header) * that performs initialization of MCU's peripherals. * * It should only be called from the startup routine before * the execution is passed to a user application * (typically started in main().) */ void _init(void) { /* Initializes the MCU revision number: */ sysctl_mcuRevision(); /* Configure system clock frequency to 50 MHz (default) */ sysctl_configSysClock(APP_SYS_CLOCK_DIV); /* Depending on configuration, enable GPIO AHB mode: */ if ( 0 != APP_GPIO_AHB ) { _sysctl_enableGpioAhb(); } /* Enable/disable FPU: */ if ( 0 != APP_FPU_ENABLE ) { fpu_enable(); /* Enable/disable lazy stacking of FPU's registers */ if ( 0 != APP_FPU_LAZY_STACKING ) { fpu_enableLazyStacking(); } else { fpu_enableStacking(); } } else { fpu_disable(); } /* * Initialize the tables of GPIO and * watchdog interrupt handlers. */ _gpio_initIntHandlers(); _wd_initIntHandlers(); }