/* Our RESET handler is called instead of the official one, so this main() method comes before the official one. Our global variables have already been initialized, but the MD380 firmware has not yet been initialized because we haven't called it. So the general idea is to initialize our stuff here, then trigger an early callback later in the MD380's main() function to perform any late hooks that must be applied to function pointers initialized in the stock firmware. */ int main(void) { dmesg_init(); led_setup(); //Done with the blinking, so start the radio application. printf("Starting main()\n"); abort_to_mfgr_app(); }
/******************************************************************************* * * sysHwInit - initialize the CPU board hardware * * This routine initializes various features of the hardware. * Normally, it is called from usrInit() in usrConfig.c. * * NOTE: This routine should not be called directly by the user. * * RETURNS: N/A * * ERRNO: N/A */ void sysHwInit (void) { dmesg_init(); /* install the IRQ/SVC interrupt stack splitting routine */ #ifndef _ARCH_SUPPORTS_PROTECT_INTERRUPT_STACK _func_armIntStackSplit = sysIntStackSplit; #endif /* !_ARCH_SUPPORTS_PROTECT_INTERRUPT_STACK */ #if defined(INCLUDE_TTY_DEV) || defined(INCLUDE_SIO_POLL) sysSerialHwInit (); #endif #ifdef FORCE_DEFAULT_BOOT_LINE strncpy(sysBootLine, DEFAULT_BOOT_LINE, strlen(DEFAULT_BOOT_LINE)+1); #endif /* FORCE_DEFAULT_BOOT_LINE */ }
void log_init() { dmesg_init(); logcat_init(); }
/* This flushes the dmesg buffer. For now that means moving the buffer to the beginning, but we'll add double-buffering when we get around to it. */ void dmesg_flush(){ dmesg_init(); }