| | |
| | | TTSCallBack.erase(it); |
| | | } |
| | | } |
| | | |
| | | extern "C" |
| | | JNIEXPORT void JNICALL |
| | | Java_com_anyun_exam_lib_RemoteService_UpgradeMcu(JNIEnv *env, jobject thiz, jstring vercode, |
| | | jbyteArray rom) { |
| | | // TODO: implement UpgradeMcu() |
| | | if (vercode != NULL && rom != NULL) { |
| | | const char *str = env->GetStringUTFChars(vercode, 0); |
| | | jbyte *c_dat = env->GetByteArrayElements(rom, NULL); |
| | | int len = env->GetArrayLength(rom); |
| | | |
| | | LoadDefaultMcuRom(str, (uint8_t *)c_dat, len); |
| | | |
| | | env->ReleaseStringUTFChars(vercode, str); |
| | | env->ReleaseByteArrayElements(rom, c_dat, NULL); |
| | | } |
| | | } |