/* * Class: cbccore_low_Create * Method: create_advance_led * Signature: (I)V */ JNIEXPORT void JNICALL Java_cbccore_low_Create_create_1advance_1led(JNIEnv *env, jobject obj, jint on) { #ifdef CBC create_advance_led(on); #else printf("Java_cbccore_low_Create_create_1advance_1led stub\n"); #endif }
// Create must be turned on and connected. This routine establishes serial link // Note that this routine should be called once, and must have been called before // any of the other create functions will work. Puts Create in "safe" mode (see documentation). // Once this function is called, you cannot talk to the XBC over the USB connection // until the create_disconnect function has been called or the GBA on the XBC has been power cycled. // If Create is connected, power light goes yellow and play led turns on int create_connect() { gc_mode=2; create_start(); create_safe(); create_advance_led(1); // turn on advance LED return(0);//successful connection }
// Create must be turned on and connected. This routine establishes serial link // Note that this routine should be called once, and must have been called before // any of the other create functions will work. // If Create is connected, power light goes yellow and play led turns on int create_connect() { gc_mode=0; serial_init(); create_start(); create_safe(); //allows create to be commanded and turns LED orange create_mode();//gets mode and sets global gc_mode if (gc_mode!=2) { // if not safe mode, connection not established printf("Create connect failed, mode is %d\n", gc_mode); g_create_connected = 0; msleep(100); beep(); msleep(100); beep(); return(-1);//connection failed } create_advance_led(1); // turn on advance LED g_create_connected = 1; atexit(create_disconnect); return(0);//successful connection }