int main (void) { long i; init_timer(&data[6], &data[0]); init_power(); play_system_sound(0x4003, 1); clear_display(); for (i = -5; i <= 5; i++) { set_lcd_number(LCD_SIGNED, i % 5, LCD_DECIMAL_0); refresh_display(); wait_release(); wait_press(); } for (i = -5; i <= 5; i++) { set_lcd_number(LCD_SIGNED, i % -5, LCD_DECIMAL_0); refresh_display(); wait_release(); wait_press(); } shutdown_timer(); return 0; }
/** * \brief Interrupt handler for the RTC. Refresh the display. */ void RTC_Handler(void) { uint32_t ul_status = rtc_get_status(RTC); /* Second increment interrupt */ if ((ul_status & RTC_SR_SEC) == RTC_SR_SEC) { /* Disable RTC interrupt */ rtc_disable_interrupt(RTC, RTC_IDR_SECDIS); refresh_display(); rtc_clear_status(RTC, RTC_SCCR_SECCLR); rtc_enable_interrupt(RTC, RTC_IER_SECEN); } else { /* Time or date alarm */ if ((ul_status & RTC_SR_ALARM) == RTC_SR_ALARM) { /* Disable RTC interrupt */ rtc_disable_interrupt(RTC, RTC_IDR_ALRDIS); gs_ul_alarm_triggered = 1; refresh_display(); /* Show additional menu item for clear notification */ gs_ul_menu_shown = 0; rtc_clear_status(RTC, RTC_SCCR_ALRCLR); rtc_enable_interrupt(RTC, RTC_IER_ALREN); } } }
int main (void) { char playing; while (1) { init_timer(&data[6], &data[0]); init_power(); set_lcd_segment(0x3020); refresh_display(); play_system_sound(0x4003, 1); wait_release(); wait_press(); play_system_sound(0x4003, 0); do { get_sound_playing_flag(0x700c, &playing); } while (playing); clear_display(); refresh_display(); shutdown_timer(); shutdown_power(); } return 0; }
static void middle_drag(int dx) { scope_disp_t *disp = &(ctrl_usr->disp); scope_horiz_t *horiz = &(ctrl_usr->horiz); double dt = (dx / disp->pixels_per_sample) / ctrl_shm->rec_len; set_horiz_pos(horiz->pos_setting + 5 * dt); refresh_display(); }
static void left_drag(int dy, int y, GdkModifierType state) { scope_disp_t *disp = &(ctrl_usr->disp); scope_vert_t *vert = &(ctrl_usr->vert); scope_chan_t *chan = &(ctrl_usr->chan[vert->selected - 1]); if(vert->selected == -1) return; if(disp->selected_part == 2 || (state & GDK_CONTROL_MASK)) { double new_position = snap(y); set_trigger_level(new_position); } else if(disp->selected_part == 1 || (state & GDK_SHIFT_MASK)) { double new_position = snap(y); set_vert_pos(new_position); // chan->position = new_position; refresh_display(); motion_y = y; } else { if(abs(dy) > 5) { int direction = dy > 0 ? 1 : -1; int baseline_y = chan->position * disp-> height; int side = select_y > baseline_y ? -1 : 1; set_vert_scale(chan->scale_index + direction * side); motion_y = y; } } }
static int heartbeat(gpointer data) { refresh_state_info(); /* check watchdog */ if (ctrl_shm->watchdog < 10) { ctrl_shm->watchdog++; } else { handle_watchdog_timeout(); } if (ctrl_usr->pending_restart && ctrl_shm->state == IDLE) { ctrl_usr->pending_restart = 0; ctrl_usr->run_mode = ctrl_usr->old_run_mode; if(ctrl_usr->run_mode != STOP) { start_capture(); } } if (ctrl_usr->display_refresh_timer > 0) { /* decrement timer, did it time out? */ if (--ctrl_usr->display_refresh_timer == 0) { /* yes, refresh the display */ refresh_display(); } } if (ctrl_shm->state == DONE) { if(!gtk_window_is_active(GTK_WINDOW(ctrl_usr->main_win))) gtk_window_set_urgency_hint(GTK_WINDOW(ctrl_usr->main_win), TRUE); capture_complete(); } else if (ctrl_usr->run_mode == ROLL) capture_cont(); return 1; }
/** * \brief Interrupt handler for the RTT. * * Display the current time on the terminal. */ void RTT_Handler(void) { uint32_t ul_status; /* Get RTT status */ ul_status = rtt_get_status(RTT); /* Time has changed, refresh display */ if ((ul_status & RTT_SR_RTTINC) == RTT_SR_RTTINC) { refresh_display(); } /* Alarm */ if ((ul_status & RTT_SR_ALMS) == RTT_SR_ALMS) { g_uc_alarmed = 1; refresh_display(); } }
void ui_click(bool longClick) { if (longClick) { if (alarm_in_motion) { stop_alarm_timer(); stop_snooze_timer(); stop_motion_capturing(); config.status = STATUS_NOTACTIVE; refresh_display(); stop_sleep_data_capturing(); } } else { if (alarm_in_motion) { // Check znooze if (snooze_active) { // Stop everything - as we have already snoozed stop_alarm_timer(); // Start snooze timer snooze_active = YES; if (config.snooze > 0) { // This should not be changed in the meanwhile snooze_timer = app_timer_register(config.snooze * 1000 * 60, snooze_tick, NULL); } } else { // activate snooze if set if (config.snooze > 0) { stop_alarm_timer(); // Start snooze timer snooze_active = YES; snooze_timer = app_timer_register(config.snooze * 1000 * 60, snooze_tick, NULL); } else { stop_alarm_timer(); stop_snooze_timer(); stop_motion_capturing(); config.status = STATUS_NOTACTIVE; refresh_display(); stop_sleep_data_capturing(); } } } } }
void loading_ui::show() { if( menu != nullptr ) { menu->show(); catacurses::refresh(); refresh_display(); #if defined(TILES) SDL_PumpEvents(); #endif // TILES } }
void gcr_certificate_details_widget_set_certificate (GcrCertificateDetailsWidget *self, GcrCertificate *cert) { g_return_if_fail (GCR_IS_CERTIFICATE_DETAILS_WIDGET (self)); if (self->pv->certificate) g_object_unref (self->pv->certificate); self->pv->certificate = cert; if (self->pv->certificate) g_object_ref (self->pv->certificate); refresh_display (self); g_object_notify (G_OBJECT (self), "certificate"); }
static int handle_motion(GtkWidget *widget, GdkEventButton *event, gpointer data) { scope_disp_t *disp = &(ctrl_usr->disp); GdkModifierType mod; int x, y; gdk_window_get_pointer(disp->drawing->window, &x, &y, &mod); if(mod & GDK_BUTTON1_MASK) { left_drag(y-motion_y, y, event->state); return TRUE; } if(mod & GDK_BUTTON2_MASK) { middle_drag(motion_x - x); } motion_x = x; refresh_display(); return TRUE; }
int main (void) { char playing; init_timer(&async, &dispatch[0]); init_power(); set_lcd_segment(0x3020); refresh_display(); play_system_sound(0x4003, 1); do { get_sound_playing_flag(0x700c, &playing); } while (playing); shutdown_timer(); return 0; }
void capture_complete(void) { capture_copy_data(); ctrl_shm->state = IDLE; switch (ctrl_usr->run_mode) { case STOP: break; case NORMAL: case ROLL: start_capture(); break; case SINGLE: /* 'push' the stop button */ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(ctrl_usr-> rm_stop_button), TRUE); break; default: break; } //uncomment me to write log files //write_log_file("scope.log"); refresh_display(); }
int main(int argc, char **argv) { const char *menu[] = { "GPSapp", NULL }; struct timeval timeout; int rc = 0; if (empeg_init() == -1) exit(0); /* set a default protocol, now we only complain when the user specifies an * unknown protocol in config.ini */ serial_protocol("NMEA"); /* For backward compatibility as the user can specify the protocol in * config.ini */ if (argc > 1) serial_protocol(argv[1]); init_gpsapp(); printf("GPS app started\n"); vfdlib_registerFont("empeg/lib/fonts/small.bf", 0); vfdlib_registerFont("empeg/lib/fonts/large.bf", 1); h0 = vfdlib_getTextHeight(0); route_init(); while (rc != -1) { if (empeg_waitmenu(menu) == -1) break; serial_open(); draw_msg("Waiting for data from GPS receiver"); draw_display(); while(1) { rc = handle_input(); if (rc) break; if (do_refresh) refresh_display(); /* pause a bit to avoid burning CPU cycles */ timeout.tv_sec = 0; timeout.tv_usec = 100000; select(0, NULL, NULL, NULL, &timeout); } #ifndef __arm__ break; #endif } serial_close(); route_init(); draw_msg("GPS app dying..."); draw_display(); sleep(5); vfdlib_unregisterAllFonts(); empeg_free(); exit(0); }
void rcx_out_int (short n) { set_lcd_number(LCD_UNSIGNED, n, LCD_DECIMAL_0); refresh_display(); }
void robot_finds_kitten::process_input( int input, const catacurses::window &w ) { timespec ts; ts.tv_sec = 1; ts.tv_nsec = 0; int check_x = robot.x; int check_y = robot.y; switch( input ) { case KEY_UP: /* up */ check_y--; break; case KEY_DOWN: /* down */ check_y++; break; case KEY_LEFT: /* left */ check_x--; break; case KEY_RIGHT: /* right */ check_x++; break; case 0: break; default: { /* invalid command */ for( int c = 0; c < rfkCOLS; c++ ) { mvwputch( w, 0, c, c_white, ' ' ); mvwputch( w, 1, c, c_white, ' ' ); } mvwprintz( w, 0, 0, c_white, _( "Invalid command: Use direction keys or press 'q'." ) ); return; } } if( check_y < 3 || check_y > rfkLINES - 1 || check_x < 0 || check_x > rfkCOLS - 1 ) { return; } if( rfkscreen[check_x][check_y] != EMPTY ) { switch( rfkscreen[check_x][check_y] ) { case ROBOT: /* We didn't move. */ break; case KITTEN: {/* Found it! */ for( int c = 0; c < rfkCOLS; c++ ) { mvwputch( w, 0, c, c_white, ' ' ); } /* The grand cinema scene. */ for( int c = 0; c <= 3; c++ ) { wmove( w, 1, ( rfkCOLS / 2 ) - 5 + c ); wputch( w, c_white, ' ' ); wmove( w, 1, ( rfkCOLS / 2 ) + 4 - c ); wputch( w, c_white, ' ' ); wmove( w, 1, ( rfkCOLS / 2 ) - 4 + c ); if( input == KEY_LEFT || input == KEY_UP ) { draw_kitten( w ); } else { draw_robot( w ); } wmove( w, 1, ( rfkCOLS / 2 ) + 3 - c ); if( input == KEY_LEFT || input == KEY_UP ) { draw_robot( w ); } else { draw_kitten( w ); } wrefresh( w ); refresh_display(); nanosleep( &ts, nullptr ); } /* They're in love! */ mvwprintz( w, 0, ( ( rfkCOLS - 6 ) / 2 ) - 1, c_light_red, "<3<3<3" ); wrefresh( w ); refresh_display(); nanosleep( &ts, nullptr ); for( int c = 0; c < rfkCOLS; c++ ) { mvwputch( w, 0, c, c_white, ' ' ); mvwputch( w, 1, c, c_white, ' ' ); } mvwprintz( w, 0, 0, c_white, _( "You found kitten! Way to go, robot!" ) ); wrefresh( w ); refresh_display(); ret = true; inp_mngr.wait_for_any_key(); } break; default: { for( int c = 0; c < rfkCOLS; c++ ) { mvwputch( w, 0, c, c_white, ' ' ); mvwputch( w, 1, c, c_white, ' ' ); } std::vector<std::string> bogusvstr = foldstring( getmessage( bogus_messages[rfkscreen[check_x][check_y] - 2] ), rfkCOLS ); for( size_t c = 0; c < bogusvstr.size(); c++ ) { mvwprintw( w, c, 0, bogusvstr[c] ); } wrefresh( w ); } break; } wmove( w, 2, 0 ); return; } /* Otherwise, move the robot. */ robot.x = check_x; robot.y = check_y; }
void recv_server_msg(struct chat_packet *c, int16 mess_type) { int ret; struct node *temp, *temp2; if (mess_type == 0) { // If the mess_type is 0, that means we already have the chat_packet, we just want to update the likes. temp = chatroom_start->next; while (temp != NULL) { if (temp->data->sequence == c->sequence) { temp->data->num_likes = c->num_likes; break; } temp = temp->next; } refresh_display(); } else if (mess_type == 13) { temp = chatroom_start; int count= 0; /* We need to put the merged chats in the correct order */ while (temp->next != NULL) { temp->next->sequence = count;/* for resequencing*/ if (c->sequence == temp->next->data->sequence) { /*already received this LTS, so don't add it. */ break; } else if (c->sequence < temp->next->data->sequence) { temp2 = temp->next; temp->next = (struct node *)calloc(1,sizeof(struct node)); temp->next->data = (struct chat_packet *)calloc(1, sizeof(struct chat_packet)); memcpy(temp->next->data, c, sizeof(struct chat_packet)); temp->next->sequence = count; temp->next->previous = temp; /*Double link list added for traversal on 25 chat lines */ temp2->previous = temp->next; temp->next->next = temp2; break; } temp = temp->next; } if (temp->next == NULL) /*We are at the end, so add the message */ { temp2 = temp->next; temp->next = (struct node *)calloc(1,sizeof(struct node)); temp->next->data = (struct chat_packet *)calloc(1,sizeof(struct chat_packet)); memcpy(temp->next->data, c, sizeof(struct chat_packet)); temp->next->sequence = count; temp->next->previous = temp; /*Double link list added for traversal on 25 chat lines */ temp->next->next = temp2; chatroom_latest = temp->next; /*set latest to this new packet */ } /*Renumber */ temp = chatroom_start; while (temp->next !=NULL) { count++; temp->next->sequence = count; temp = temp->next; } line_number = count; refresh_display(); //print_after(c->sequence); /*Print out where we added the packet (for dispaly consistency)*/ } else if (c->type == 0 || c->type == 3) /*Message packet */ { if (c->type == 0) line_number++; /*Only update line number on text message */ chatroom_latest->next = (struct node *)calloc(1,sizeof(struct node)); chatroom_latest->next->previous = chatroom_latest; chatroom_latest = chatroom_latest->next; /*Advance the pointer */ chatroom_latest->data = (struct chat_packet *)calloc(1,sizeof(struct chat_packet)); chatroom_latest->sequence = line_number; memcpy(chatroom_latest->data, c, sizeof(struct chat_packet)); if (c->type == 0) /* Live message, display it */ { refresh_display(); } } else if (c->type == 2) { printf("Successful connection to server %d\n>", c->server_id); connected = c->server_id; } else if (c->type == 5) /* Received response to join group */ { ret = SP_join( Mbox, c->group ); if( ret < 0 ) SP_error( ret ); bzero(chatroom, MAX_GROUP_NAME); strncpy(chatroom, c->group, strlen(c->group)-1); /*Remove server id from chatroom group name */ chatroom_start = (struct node *)calloc(1, sizeof(struct node)); chatroom_latest = chatroom_start; printf("Successfully joined group %s\n>", chatroom); /* don't display server index at end of group */ line_number = 0; /*Refresh line number */ } else if (c->type == 6) /*Refresh screen all after lamport timestamp */ /*No longer necessary*/ { struct node *i; i = chatroom_start->next; /* Setup iterator */ line_number = 0; while ((i !=NULL) && ((i->data->sequence != c->sequence) || (i->data->server_id != c->server_id))) { line_number++; i = i->next; } while (i != NULL) { line_number++; printf("%d:%s> %s",line_number, i->data->name, i->data->text); } } else if (c->type == 8) /*Display servers online */ { printf("Servers that are online are: %s\n>", c->text); } else if (c->type == 9) /*Updated name list for chatroom */ { bzero(attendees, 80); strncpy(attendees, c->text, strlen(c->text)); //printf("Members in chatroom are now: %s\n>", c->text); Moved to display. refresh_display(); } }
/** * \brief Application entry point for RTT example. * * Initialize the RTT, display the current time and allow the user to * perform several actions: clear the timer, set an alarm, etc. * * \return Unused (ANSI-C compatibility). */ int main(void) { uint8_t c; /* Initialize the SAM system */ sysclk_init(); board_init(); /* Configure console UART */ configure_console(); /* Output example information */ puts(STRING_HEADER); /* Configure RTT */ configure_rtt(); /* Initialize state machine */ g_uc_state = STATE_MAIN_MENU; g_uc_alarmed = 0; refresh_display(); /* User input loop */ while (1) { /* Wait for user input */ while (uart_read(CONSOLE_UART, &c)); /* Main menu mode */ if (g_uc_state == STATE_MAIN_MENU) { /* Reset timer */ if (c == 'r') { configure_rtt(); refresh_display(); } else if (c == 's') { /* Set alarm */ g_uc_state = STATE_SET_ALARM; g_ul_new_alarm = 0; refresh_display(); } else { /* Clear alarm */ if ((c == 'c') && g_uc_alarmed) { g_uc_alarmed = 0; refresh_display(); } } } else if (g_uc_state == STATE_SET_ALARM) { /* Set alarm mode */ /* Number */ if ((c >= '0') && (c <= '9')) { g_ul_new_alarm = g_ul_new_alarm * 10 + c - '0'; refresh_display(); } else if (c == ASCII_BS) { uart_write(CONSOLE_UART, c); g_ul_new_alarm /= 10; refresh_display(); } else if (c == ASCII_CR) { /* Avoid newAlarm = 0 case */ if (g_ul_new_alarm != 0) { rtt_write_alarm_time(RTT, g_ul_new_alarm); } g_uc_state = STATE_MAIN_MENU; refresh_display(); } } } }
void debug_value(short value) { set_lcd_number(0x3001, value / 10, 0x3002); set_lcd_number(0x3017, value % 10, 0x0000); refresh_display(); }
/** * \brief Application entry point for RTC example. * * \return Unused (ANSI-C compatibility). */ int main(void) { uint8_t uc_key; /* Initialize the SAM system */ sysclk_init(); board_init(); /* Initialize the console uart */ configure_console(); /* Output example information */ puts(STRING_HEADER); /* Default RTC configuration, 24-hour mode */ rtc_set_hour_mode(RTC, 0); /* Configure RTC interrupts */ NVIC_DisableIRQ(RTC_IRQn); NVIC_ClearPendingIRQ(RTC_IRQn); NVIC_SetPriority(RTC_IRQn, 0); NVIC_EnableIRQ(RTC_IRQn); rtc_enable_interrupt(RTC, RTC_IER_SECEN | RTC_IER_ALREN); /* Refresh display once */ refresh_display(); /* Handle keypresses */ while (1) { while (uart_read(CONSOLE_UART, &uc_key)); /* Set time */ if (uc_key == 't') { gs_ul_state = STATE_SET_TIME; do { puts("\n\r\n\r Set time(hh:mm:ss): "); } while (get_new_time()); /* If valid input, none of the variables for time is 0xff. */ if (gs_ul_new_hour != 0xFFFFFFFF && (gs_uc_rtc_time[2] == ':') && (gs_uc_rtc_time[5] == ':')) { if (rtc_set_time(RTC, gs_ul_new_hour, gs_ul_new_minute, gs_ul_new_second)) { puts("\n\r Time not set, invalid input!\r"); } } else { gs_uc_rtc_time[2] = ':'; gs_uc_rtc_time[5] = ':'; puts("\n\r Time not set, invalid input!\r"); } gs_ul_state = STATE_MENU; gs_ul_menu_shown = 0; refresh_display(); } /* Set date */ if (uc_key == 'd') { gs_ul_state = STATE_SET_DATE; do { puts("\n\r\n\r Set date(mm/dd/yyyy): "); } while (get_new_date()); /* If valid input, none of the variables for date is 0xff(ff). */ if (gs_ul_new_year != 0xFFFFFFFF && (gs_uc_date[2] == '/') && (gs_uc_date[5] == '/')) { if (rtc_set_date(RTC, gs_ul_new_year, gs_ul_new_month, gs_ul_new_day, gs_ul_new_week)) { puts("\n\r Date not set, invalid input!\r"); } } else { gs_uc_date[2] = '/'; gs_uc_date[5] = '/'; puts("\n\r Time not set, invalid input!\r"); } /* Only 'mm/dd' is input. */ if (gs_ul_new_month != 0xFFFFFFFF && gs_ul_new_year == 0xFFFFFFFF) { puts("\n\r Not Set for no year field!\r"); } gs_ul_state = STATE_MENU; gs_ul_menu_shown = 0; refresh_display(); } /* Set time alarm */ if (uc_key == 'i') { gs_ul_state = STATE_SET_TIME_ALARM; rtc_clear_date_alarm(RTC); do { puts("\n\r\n\r Set time alarm(hh:mm:ss): "); } while (get_new_time()); if (gs_ul_new_hour != 0xFFFFFFFF && (gs_uc_rtc_time[2] == ':') && (gs_uc_rtc_time[5] == ':')) { if (rtc_set_time_alarm(RTC, 1, gs_ul_new_hour, 1, gs_ul_new_minute, 1, gs_ul_new_second)) { puts("\n\r Time alarm not set, invalid input!\r"); } else { printf("\n\r Time alarm is set at %02u:%02u:%02u!", (unsigned int)gs_ul_new_hour, (unsigned int)gs_ul_new_minute, (unsigned int)gs_ul_new_second); } } else { gs_uc_rtc_time[2] = ':'; gs_uc_rtc_time[5] = ':'; puts("\n\r Time not set, invalid input!\r"); } gs_ul_state = STATE_MENU; gs_ul_menu_shown = 0; gs_ul_alarm_triggered = 0; refresh_display(); } /* Set date alarm */ if (uc_key == 'm') { gs_ul_state = STATE_SET_DATE_ALARM; rtc_clear_time_alarm(RTC); do { puts("\n\r\n\r Set date alarm(mm/dd/yyyy): "); } while (get_new_date()); if (gs_ul_new_year != 0xFFFFFFFF && (gs_uc_date[2] == '/') && (gs_uc_date[5] == '/')) { if (rtc_set_date_alarm(RTC, 1, gs_ul_new_month, 1, gs_ul_new_day)) { puts("\n\r Date alarm not set, invalid input!\r"); } else { printf("\n\r Date alarm is set on %02u/%02u/%4u!", (unsigned int)gs_ul_new_month, (unsigned int)gs_ul_new_day, (unsigned int)gs_ul_new_year); } } else { gs_uc_date[2] = '/'; gs_uc_date[5] = '/'; puts("\n\r Date alarm not set, invalid input!\r"); } gs_ul_state = STATE_MENU; gs_ul_menu_shown = 0; gs_ul_alarm_triggered = 0; refresh_display(); } #if ((SAM3S8) || (SAM3SD8) || (SAM4S) || (SAM4C) || (SAM4CP) || (SAM4CM)) /* Generate Waveform */ if (uc_key == 'w') { gs_ul_state = STATE_WAVEFORM; puts("\n\rMenu:\n\r" " 0 - No Waveform\n\r" " 1 - 1 Hz square wave\n\r" " 2 - 32 Hz square wave\n\r" " 3 - 64 Hz square wave\n\r" " 4 - 512 Hz square wave\n\r" " 5 - Toggles when alarm flag rise\n\r" " 6 - Copy of the alarm flag\n\r" " 7 - Duty cycle programmable pulse\n\r" " 8 - Quit\r"); while (1) { while (uart_read(CONSOLE_UART, &uc_key)); if ((uc_key >= '0') && (uc_key <= '7')) { rtc_set_waveform(RTC, 0, char_to_digit(uc_key)); } if (uc_key == '8') { gs_ul_state = STATE_MENU; gs_ul_menu_shown = 0; refresh_display(); break; } } } #endif /* Clear trigger flag */ if (uc_key == 'c') { gs_ul_alarm_triggered = 0; gs_ul_menu_shown = 0; refresh_display(); } } }
int main (void) { char playing; short count = -10; int count2 = 0; int sound = 0; int i, j; unsigned char op = 0; char code; while (1) { init_timer(&data[6], &data[0]); init_power(); play_system_sound(0x4003, 1); #if 1 init_buttons(); clear_display(); #endif #if 0 *((volatile void **)0xfda2) = motor_control; while (1); #endif #if 0 while (1) { for (j = 0; j < 100; j++) { percent=j; set_lcd_number(0x3001, j, 0x3002); refresh_display(); for (i = 0; i < 1000; i++); } } #endif #if 0 while (1) { int i; *((short *)0xc000) = 0x0; #if 0 count2 += *((short *)0xfb7f); #endif for (i = 0; i < 1000; i++) { count++; } } #endif #if 0 while (1) { set_lcd_number(0x3017, count, 0x3002); refresh_display(); count ++; #if 1 wait_release(); wait_press(); #endif } #endif #if 1 count = 1; while (1) { set_lcd_number(0x301f, count, 0x3002); refresh_display(); count ++; wait_release(); wait_press(); } #endif #if 0 set_lcd_number(0x301f, 0xffff, 0x3002); refresh_display(); wait_release(); wait_press(); break; #endif #if 0 play_system_sound(0x4003, 0); do { get_sound_playing_flag(0x700c, &playing); } while (playing); clear_display(); refresh_display(); shutdown_power(); #endif } return 0; }
void capture_cont() { capture_copy_data(); refresh_display(); }