SWIGEXPORT void JNICALL Java_com_blf_calendar_calendarCoreJNI_date_1set(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2, jint jarg3, jint jarg4) { SDate *arg1 = (SDate *) 0 ; int arg2 ; int arg3 ; int arg4 ; (void)jenv; (void)jcls; (void)jarg1_; arg1 = *(SDate **)&jarg1; arg2 = (int)jarg2; arg3 = (int)jarg3; arg4 = (int)jarg4; date_set(arg1,arg2,arg3,arg4); }
static void msg( void *plcdmsg ) { LCD_MSG * plcd_msg = (LCD_MSG* )plcdmsg; char ch,buf[100]; uint32_t i; void *pmsg; if( plcd_msg->id == LCD_MSG_ID_GPS ) { if( ( gps_fixed_sec == 0 ) && ( plcd_msg->info.gps_rmc.gps_av == 'A' ) ) { gps_fixed_sec = rt_tick_get( ) * 10 / 1000; test_flag|=TEST_BIT_GPS; sprintf( buf, "%02d:%02d", gps_fixed_sec / 60, gps_fixed_sec % 60 ); lcd_asc0608( 0, 8, buf, LCD_MODE_SET ); i=sprintf(buf,"AT%%TTS=2,3,5,\"475053D2D1B6A8CEBB\"\r\n",ch+0x30); buf[i]=0; pmsg=rt_malloc(i+1); if(pmsg!=RT_NULL) { memcpy(pmsg,buf,i+1); rt_mb_send(&mb_tts,(rt_uint32_t)pmsg); } } year=plcd_msg->info.gps_rmc.year; month=plcd_msg->info.gps_rmc.month; day= plcd_msg->info.gps_rmc.day; hour= plcd_msg->info.gps_rmc.hour; minute= plcd_msg->info.gps_rmc.minitue; sec= plcd_msg->info.gps_rmc.sec; time_set(hour,minute,sec); date_set(year,month,day); sprintf( buf, "%c%02d-%02d %02d:%02d:%02d", plcd_msg->info.gps_rmc.gps_av,month,day,hour,minute,sec ); lcd_asc0608( 122 - 6 * 15, 8, buf, LCD_MODE_SET ); } if( plcd_msg->id == LCD_MSG_ID_GSM ) { if( plcd_msg->info.payload[0] == 1 ) /*通话*/ { rt_kprintf( "\r\nIncoming Call" ); pscr = &scr_2_call; pscr->show( &scr_1_idle ); } } if(plcd_msg->id == LCD_MSG_ID_GPRS) { gprs_ok_past_sec=rt_tick_get()/100; test_flag|=TEST_BIT_GPRS; } if(plcd_msg->id == LCD_MSG_ID_MEMS) { mems_status=plcd_msg->info.payload[0]; } if(plcd_msg->id == LCD_MSG_ID_CAM) { ch=plcd_msg->info.payload[0]; switch(ch) { case 1: test_flag|=TEST_BIT_CAM1; break; case 2: test_flag|=TEST_BIT_CAM2; break; case 3: test_flag|=TEST_BIT_CAM3; break; case 4: test_flag|=TEST_BIT_CAM4; break; } if(plcd_msg->info.payload[1]==SUCCESS) { i=sprintf(buf,"AT%%TTS=2,3,5,\"C5C4D5D5%02xD5FDB3A3\"\r\n",ch+0x30); cam_ch[ch-1]=0x30+ch; lcd_asc0608( 122 - 6*8-4, 24, cam_ch, LCD_MODE_SET ); } else { i=sprintf(buf,"AT%%TTS=2,3,5,\"C5C4D5D5%02xD2ECB3A3\"\r\n",ch+0x30); } buf[i]=0; pmsg=rt_malloc(i+1); if(pmsg!=RT_NULL) { memcpy(pmsg,buf,i+1); rt_mb_send(&mb_tts,(rt_uint32_t)pmsg); } } if(plcd_msg->id == LCD_MSG_ID_ICCARD) { iccard_beep_timeout=10; card_status=plcd_msg->info.payload[0]; if(card_status==IC_PLUG_OUT) { i=sprintf(buf,"AT%%TTS=2,3,5,\"4943BFA8B0CEB3F6\"\r\n\0");/*IC卡拔出*/ pmsg=rt_malloc(i); if(pmsg!=RT_NULL) { memcpy(pmsg,buf,i); rt_mb_send(&mb_tts,(rt_uint32_t)pmsg); } } if(card_status==IC_READ_OK) { i=sprintf(buf,"AT%%TTS=2,3,5,\"4943BFA8D5FDB3A3\"\r\n\0"); /*IC卡正常*/ pmsg=rt_malloc(i); if(pmsg!=RT_NULL) { memcpy(pmsg,buf,i); rt_mb_send(&mb_tts,(rt_uint32_t)pmsg); } } if(card_status==IC_READ_ERR) { i=sprintf(buf,"AT%%TTS=2,3,5,\"4943BFA8B4EDCEF3\"\r\n\0"); /*IC卡错误*/ pmsg=rt_malloc(i); if(pmsg!=RT_NULL) { memcpy(pmsg,buf,i); rt_mb_send(&mb_tts,(rt_uint32_t)pmsg); } } test_flag|=TEST_BIT_ICCARD; } if(plcd_msg->id == LCD_MSG_ID_RTC) { memset(buf,0,32); if(plcd_msg->info.payload[0]==SUCCESS) { i=sprintf(buf,"AT%%TTS=2,3,5,\"525443D5FDB3A3\"\r\n",ch+0x30); test_flag|=TEST_BIT_RTC; rtc_ok=1; } else { i=sprintf(buf,"AT%%TTS=2,3,5,\"525443D2ECB3A3\"\r\n",ch+0x30); } rt_kprintf("\r\nRTC len=%d\r\n",i); buf[i]=0; pmsg=rt_malloc(i+1); if(pmsg!=RT_NULL) { memcpy(pmsg,buf,i+1); rt_mb_send(&mb_tts,(rt_uint32_t)pmsg); } } if(plcd_msg->id == LCD_MSG_ID_CSQ) { gsm_csq=plcd_msg->info.payload[0]; rt_kprintf("\r\ncsq=%d",gsm_csq); } if(test_flag==TEST_BIT_ALL) { i=sprintf(buf,"AT%%TTS=2,3,5,\"B2E2CAD4CDEAB3C9\"\r\n"); buf[i]=0; pmsg=rt_malloc(i+1); if(pmsg!=RT_NULL) { memcpy(pmsg,buf,i+1); rt_mb_send(&mb_tts,(rt_uint32_t)pmsg); } } showinfo(); }