untitled

Size: px
Start display at page:

Download "untitled"

Transcription

1 1 MiniGUI 1.1 MiniGUI for uc/os-ii 1 (1) MiniGUI MiniGUI (2) MiniGUI for uc/os-ii 2 PC MagicARM2200 Windows98/XP/2000 ADS 1.2 µc/os-ii (V2.52) MiniGUI-STR(for uc/os-ii) 3 MiniGUI-STR(for uc/os-ii) MagicARM2200 MiniGUI MessageBox Hello MiniGUI! 4 (1) <<ARM ( )>> 1 MagicARM2200 (2) MiniGUI <<MiniGUI >> <<MiniGUI >> MiniGUI 5 (1) MiniGUI MiniGUI Linux MiniGUI Linux uclinux uc/os-ii ecos VxWorks MiniGUI MiniGUI MiniGUI 1.1 MiniGUI ANSI C MiniGUI API 1

2 1.1 MiniGUI MiniGUI (2) MiniGUI-STR MiniGUI-STR MiniGUI-Threads MiniGUI-Lite MiniGUI-Standalone / API API GAL FrameBuffer qvfb ISO ISO GB2312 BIG5 RBF VBF rbf-fixed-rrncnn-8-16-iso rbf-fixed-rrncnn gb rbf-fixed-rrncnn big5 vbf-courier-rrncnn iso vbf-helvetica-rrncnn iso vbf-times-rrncnn iso Windows BMP GIF JPEG PNG PC 3D Flat Phone GB2312 Static Button Simple edit box Single-line edit box Multiple-line edit box ListBox ComboBox ProgressBar NewToolbar MenuButton TrackBar PropertySheet ScrollView uc/os-ii MiniGUI-STR for uc/os-ii MiniGUI-Threads JPEG PNG FrameBuffer (3) MiniGUI-STR MagicARM2200 MiniGUI-STR for uc/os-ii 2 MiniGUI_Lib MiniGUI-STR libminigui 2

3 Libc uc/os-ii POSIX (4) MiniGUI MiniGUI for uc/os-ii ( PC ) MiniGUI ( ) MiniGUI ( MiniGUI_Lib.a) MiniGUI MiniGUI POSIX *.axf *.bin MiniGUI (*.axf *.bin ) MiniGUI ( ) MiniGUI MiniGUI (5) MiniGUI GAL MiniGUI v0.3.xx MiniGUI (Graphics and Input Abstract Layer GAL IAL) MiniGUI-STR newgal GAL MagicARM2200 MiniGUI_Lib\libminigui-str ucosii\src\ga l\native commlcd.c GAL GAL #include <stdio.h> #include <stdlib.h> #include <stdarg.h> #include "native.h" #ifdef _NATIVE_GAL_COMMLCD #include "lcddrive.h" #include "fb.h" static PSD fb_open(psd psd) { PSUBDRIVER subdriver; LCM_Init(); fprintf(stderr, "GAL Common LCD engine: Init LCM!\n"); // psd->planes = 1; psd->xres = GUI_LCM_XMAX; psd->yres = GUI_LCM_YMAX; // // 3

4 psd->bpp = 8; psd->linelen = psd->xres; // psd->ncolors = 1 << (psd->bpp); // // Framebuffer psd->addr = malloc(gui_lcm_xmax * GUI_LCM_YMAX ); // 1 if (! psd->addr ) { fprintf(stderr, "GAL Common LCD engine: Couldn't allocate buffer!\n"); return(null); // ( NULL) psd->gr_mode = MODE_SET; // ( AND XOR ) psd->size = 0; psd->flags = PSF_MEMORY; psd->flags = PSF_MSBRIGHT; // ( fb ) // MEMORY // psd->pixtype = PF_TRUECOLOR332; subdriver = select_fb_subdriver(psd); if (!subdriver) { fprintf(stderr,"gal Common LCD engine: No driver for bpp %d\n", psd->bpp); goto fail; if (!set_subdriver(psd, subdriver, TRUE)) { fprintf(stderr,"gal Common LCD engine: Driver initialize failed for bpp %d\n", psd->bpp); goto fail; return psd; fail: return NULL; /* close framebuffer*/ static void fb_close (PSD psd) { if (psd->addr) free(psd->addr); psd->addr = NULL; 4

5 static void fb_setpalette (PSD psd, int first, int count, GAL_Color *palette) { static void fb_getpalette (PSD psd, int first, int count, GAL_Color *palette) { static void update_rect(psd psd, int l, int t, int r, int b) { int bak; if(l > r) { bak = l; l = r; r = bak; if(t > b) { bak = t; t = b; b = bak; LCM_UpdateRects(l, t, r +1 - l, b +1 - t, psd->addr); SCREENDEVICE commlcd = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, fb_open, fb_close, fb_setpalette, fb_getpalette, native_gen_allocatememgc, fb_mapmemgc, native_gen_freememgc, native_gen_clippoint, native_gen_fillrect, NULL, /* DrawPixel subdriver */ 5

6 NULL, /* ReadPixel subdriver */ NULL, /* DrawHLine subdriver */ NULL, /* DrawVLine subdriver */ NULL, /* Blit subdriver */ NULL, /* PutBox subdriver */ NULL, /* GetBox subdriver */ NULL, /* PutBoxMask subdriver */ NULL, /* CopyBox subdriver */ update_rect ; #endif /* _NATIVE_GAL_COMMLCD */ 1.1 GUI_LCM_XMAX GUI_LCM_YMAX lcddrive.h x y 320x240 GUI_LCM_XMAX 320 GUI_LCM_YMAX 240 LCM_Init LCM_UpdateRects (lcddrive.c ) MiniGUI_Lib\libminigui-str ucosii\src\gal\native lcddrive.c lcddrive.h lcddrive.c LPC2294 lpc2294.h (6) MiniGUI IAL MiniGUI INPUT MiniGUI_Lib\libminigui-str ucosii\src\include\ial.h INPUT IAL INPUT MiniGUI init_input term_input IAL IAL ( init_input MiniGUI IAL ) MiniGUI_Lib\libminigui-str ucosii\src\ial comminput.c IAL IAL #include <stdio.h> #include <stdlib.h> #include "common.h" #ifdef _COMM_IAL #include "minigui.h" #include "misc.h" #include "ial.h" #include "comminput.h" 6

7 ////////////////////////////////////////////////////////////////////////////// // COMM_IAL ( mgdrv-ucosii.c ) extern int comm_ts_getdata (short *x, short *y, short *button); extern int comm_kb_getdata (short *key, short *status); extern int comm_wait_for_input(void); ///////////////////////////////////////////////////////////////////////////// // static int MOUSEX = 0, MOUSEY = 0, MOUSEBUTTON = 0; static short KEYCODE = 0, KEYSTATUS = 0; // // // ( 1) static int mouse_update (void) { return 1; // (x,y) static void mouse_getxy (int *x, int* y) { *x = MOUSEX; *y = MOUSEY; // // IAL_MOUSE_LEFTBUTTON( ) // IAL_MOUSE_MIDDLEBUTTON( ) IAL_MOUSE_RIGHTBUTTON // ( ) " " static int mouse_getbutton (void) { return MOUSEBUTTON; ///////////////////////////////////////////////////////////////////////////// static unsigned char kbd_state[nr_keys]; // // ( kbd_state ) static int keyboard_update (void) { kbd_state[keycode] = KEYSTATUS; return KEYCODE + 1; 7

8 // ( ) static const char* keyboard_getstate (void) { return kbd_state; ///////////////////////////////////////////////////////////////////////////// static int wait_event( int which, fd_set *in, fd_set *out, fd_set *except, struct timeval *timeout) { int retvalue; retvalue = comm_wait_for_input (); // ( ) if (retvalue & IAL_MOUSEEVENT) // { // button MOUSEX MOUSEY comm_ts_getdata (&MOUSEX, &MOUSEY, &MOUSEBUTTON); retvalue = IAL_MOUSEEVENT; else { if (retvalue & IAL_KEYEVENT) // { comm_kb_getdata (&KEYCODE, &KEYSTATUS); if (kbd_state[keycode] == KEYSTATUS) return -1; retvalue = IAL_KEYEVENT; else { retvalue = -1; return(retvalue); ///////////////////////////////////////////////////////////////////////////// // INPUT BOOL InitCOMMInput (INPUT* input, const char* mdev, const char* mtype) { // //( ) 8

9 input->update_mouse = mouse_update; input->get_mouse_xy = mouse_getxy; input->set_mouse_xy = NULL; // input->get_mouse_button = mouse_getbutton; input->set_mouse_range = NULL; // input->suspend_mouse= NULL; input->resume_mouse = NULL; input->update_keyboard = keyboard_update; input->get_keyboard_state = keyboard_getstate; input->suspend_keyboard = NULL; input->resume_keyboard = NULL; input->set_leds = NULL; input->wait_event = wait_event; return(true); // // // LED // // void TermCOMMInput (void) { #endif /* _COMM_IAL */ 1.2 wait_event comm_wait_for_input comm_ts_getdata comm_kb_getdata comm_wait_for_input comm_ts_getdata comm_kb_getdata (comm_drive.c ) MiniGUI_Lib\libminigui-str ucosii\src\ial comm_drive.c comm_drive.c MagicARM / (S8 ) (S9 ) (S10 ) (S16 ) * (S5 ) (S6 ) (S7 ) (S15 ) (S2 ) (S3 ) (S4 ) (S14 ) 0 + Enter (S1 ) (S11 ) (S12 ) (S13 ) 1.2 9

10 (7) MiniGUI MiniGUI ( ) MiniGUI for uc/os-ii MiniGUI_Lib\libminigui-str ucosii\src\sysres\mgetc.c mgetc.c ( mgetc-ucosii-xxx.c) mgetc.c (include) MagicARM2200 mgetc.c mgetc-ucosii-magicarm2200.c #if defined( UCOSII ) static char *SYSTEM_VALUES[] = {"commlcd", "comm", "/dev/mouse", "IMPS2"; static char *FBCON_VALUES[] = {"32x240-8bpp"; static char *SYSTEMFONT_KEYS[] = {"font_number", "font0", "font1", "font2", "default", "wchar_def", "fixed", "caption", "menu", "control"; static char *SYSTEMFONT_VALUES[] = { "3","rbf-fixed-rrncnn-8-16-ISO8859-1", "*-fixed-rrncnn-*-16-gb2312", "*-Helvetica-rrncnn-*-16-GB2312", "0", "1", "1", "2", "2", "2" ; #endif 1.3 SYSTEM_VALUES MiniGUI for uc/os-ii FBCON_VALUES SYSTEMFONT_KEYS SYSTEMFONT_VALUES MiniGUI MiniGUI MiniGUI ( IAL ) MiniGUI for uc/os-ii MiniGUI_Lib\libminigui-str ucosii\conf ig.h MiniGUI(for uc/os-ii) _INCORE_RES uc/os-ii 1 _DUMMY_IAL dummy 1 _COMM_IAL MiniGUI for uc/os-ii (IAL ) 1 10

11 _NATIVE_GAL_COMMLCD MiniGUI for uc/os-ii (GAL ) 1 _PC3D_WINDOW_STYLE MiniGUI for uc/os-ii 1 (pc3d) _PHONE_WINDOW_STYLE MiniGUI for uc/os-ii 1 PC (phone) _GB_SUPPORT GB _RBF_SUPPORT RBF 1 _INCORERBF_GB _INCORERBF_LATIN1_16 16 ( 12 ) 1 NOLINUX linux 1 UCOSII MiniGUI for uc/os-ii 1 ADS 1.2 MiniGUI_Lib MiniGUI_Lib MiniGUI_Lib Make 1.3 MiniGUI 1.3 MiniGUI_Lib MiniGUI_Lib.a ( MiniGUI_Lib\MiniGUI_Lib_Data\Debug Rel ) MiniGUI_Lib\ucos_include\os_cfg.h ( GUI_Sample ) MiniGUI for uc/os-ii OS_TICKS_PER_SEC 11

12 libextc.a Libc libextc.a uc/os-ii POSIX malloc/free printf/sprintf I/O libextc.a MagicARM2200 3M 1 uc/os-ii 42 MiniGUI 3 POSIX ( MiniGUI ) 16 ( MiniGUI ) MiniGUI 8K 6 (1) PC MiniGUI_Lib ( MiniGUI-STR ) MiniGUI_Lib.a (2) ARM ( ) 2.27 ( E2PROM) ChkTouch (3) ucos-ii LPC2200 uc/os-ii ( arm Arm_Pc ) ucos-ii LPC2200 uc/os-ii ( arm Arm_Pc ) (4) ucos-ii SOURCE uc/os-ii v SOURCE (5) ucos-ii MiniGUI MiniGUI_Lib.a libextc.a( uc/os-ii POSIX ) MiniGUI MiniGUI_Lib\libminig ui-str ucosii\include MiniGUI MiniGUI_Lib\lib minigui-str ucosii\config.h MiniGUI MiniGUI_conf ig.h MiniGUI MiniGUI (6) ADS 1.2 LPC2200 ARM Executable Image 12

13 for UCOSII(MaigcARM2200) GUI_Sample ucos-ii (7) MiniGUI ucos-ii\minigui MiniGUI src messagebox messagebox MiniGUI messageb.c GUI_Sample usr (8) usr main.c uc/os-ii 1.4 minigui_app_entry MiniGUI ( minigui_app_entry ) uc/os-ii Task0 TargetInit MiniGUI Task0 E2PROM Task1 1.4 main.c #include "config.h" #include "stdlib.h" extern void minigui_app_entry (void); // typedef struct TOUCH_KEY { uint8 sta; // d1 1 d0 1 // d7 1 / 0 uint8 key; // (0--15) // uint16 x; uint16 y; TouchKey_Sta; // (0,0) uint16 g_vx_min, g_vy_min; uint16 g_vinx0, g_viny0; uint16 g_vinx1, g_viny1; uint16 touch_wide, touch_high; /* */ OS_EVENT *TouchKeyMbox = NULL; // #define TaskStkLengh 64 // Define the Task0 stack length 0 OS_STK TaskStk [TaskStkLengh]; // Define the Task0 stack 0 void Task0(void *pdata); // Task0 0 OS_STK Task1Stk [TaskStkLengh]; // Define the Task1 stack 1 13

14 void Task1(void *pdata); // Task0 1 int main(void) { OSInit (); OSTaskCreate (Task0,(void *)0, &TaskStk[TaskStkLengh - 1], 10); minigui_app_entry(); TouchKeyMbox = OSMboxCreate(NULL); // OSStart(); return(0); /**************************************************************************** * TestTouch() * E2PROM * * 1 0 * E2PROM * 0xE0 0xE1 0x5A 0xA5 * 0xE2 0xE3 (0,0) g_vx_min * 0xE4 0xE5 (0,0) g_vy_min * 0xE6 0xE7 1 g_vinx0 * 0xE8 0xE9 1 g_viny0 * 0xEA 0xEB 2 g_vinx1 * 0xEC 0xED 2 g_viny1 * 0xF0 0xF1 1 2 x wide * 0xF2 0xF4 1 2 y high ****************************************************************************/ uint8 TestTouch(void) { uint8 dat_buf1[20]; uint8 adr_buf[2]; // E2PROM adr_buf[0] = 0xE0; I2cRead(CAT1025, dat_buf1, adr_buf, 1, 14); adr_buf[0] = 0xF0; I2cRead(CAT1025, &dat_buf1[14], adr_buf, 1, 4); // g_vx_min = (dat_buf1[2] << 8) + dat_buf1[3]; g_vy_min = (dat_buf1[4] << 8) + dat_buf1[5]; g_vinx0 = (dat_buf1[6] << 8) + dat_buf1[7]; 14

15 g_viny0 = (dat_buf1[8] << 8) + dat_buf1[9]; g_vinx1 = (dat_buf1[10] << 8) + dat_buf1[11]; g_viny1 = (dat_buf1[12] << 8) + dat_buf1[13]; touch_wide = (dat_buf1[14] << 8) + dat_buf1[15]; touch_high = (dat_buf1[16] << 8) + dat_buf1[17]; // if((dat_buf1[0] == 0x5A) && (dat_buf1[1] == 0xA5)) return(1); else return(0); /**************************************************************************** * GetLCD_XY() * * * vx x (LCD) * vy y (LCD) * * y 6 * * ****************************************************************************/ uint8 GetLCD_XY(uint16 *vx, uint16 *vy) { uint16 vx_dat, vy_dat; uint16 vx_dat1, vy_dat1; int i; // ( ADS7843 PENIRQ ) for(i=0; i<3; i++) { vy_dat = ADS7843_WriteRead(AIN_Y); *vy = vy_dat; // vy (vy=0) if(vy_dat!= 0) break; // end of while(1)... if(i>=3) return(0); // vx_dat = ADS7843_WriteRead(AIN_X); vy_dat = ADS7843_WriteRead(AIN_Y); for(i=0; i<100; i++); vx_dat1 = ADS7843_WriteRead(AIN_X); vy_dat1 = ADS7843_WriteRead(AIN_Y); if((vy_dat<3) (vy_dat1<3)) return(0); 15

16 if(vx_dat>vx_dat1) { if((vx_dat-vx_dat1) > 13) return(0); else { if((vx_dat1-vx_dat) > 13) return(0); if(vy_dat>vy_dat1) { if((vy_dat-vy_dat1) > 18) return(0); else { if((vy_dat1-vy_dat) > 18) return(0); *vx = (vx_dat+vx_dat1) >> 1; *vy = (vy_dat+vy_dat1) >> 1; return(1); /******************************************************************************************* ** Task0 0 ** ZLG7290 TouchKeyMbox ** MiniGUI "comm" IAL TouchKeyMbox *******************************************************************************************/ void Task0(void *pdata) { static uint8 s_enter_sta = 0; static TouchKey_Sta s_event_input; uint16 key; pdata = pdata; TargetInit(); if(testtouch() == 0) // { // "Error 01" ZLG7290ShowChar(7, 0x0E); OSTimeDly(OS_TICKS_PER_SEC / 100); ZLG7290ShowChar(6, 0x18); OSTimeDly(OS_TICKS_PER_SEC / 100); ZLG7290ShowChar(5, 0x18); OSTimeDly(OS_TICKS_PER_SEC / 100); ZLG7290ShowChar(4, 0x15); OSTimeDly(OS_TICKS_PER_SEC / 100); ZLG7290ShowChar(3, 0x18); OSTimeDly(OS_TICKS_PER_SEC / 100); 16

17 ZLG7290ShowChar(2, 0x1F); OSTimeDly(OS_TICKS_PER_SEC / 100); ZLG7290ShowChar(1, 0x00); OSTimeDly(OS_TICKS_PER_SEC / 100); ZLG7290ShowChar(0, 0x01); OSTimeDly(OS_TICKS_PER_SEC / 100); // OSTaskCreate (Task1,(void *)0, &Task1Stk[TaskStkLengh - 1], 9); while (1) { key = ZLG7290GetKey(); // if(key&0x00ff) // { if(s_enter_sta == 0) // { // s_event_input.sta = 0x82; s_event_input.key = (key-1)&0x000f; // OSMboxPost(TouchKeyMbox, (void *)&s_event_input); s_enter_sta = 1; else // { if(s_enter_sta!= 0) // { s_event_input.sta = 0x02; OSMboxPost(TouchKeyMbox, (void *)&s_event_input); s_enter_sta = 0; // end of if(key&0x00ff)...else... OSTimeDly(1); /****************************************************************************************** ** Task1 1 ** TouchKeyMbox ** MiniGUI "comm" IAL TouchKeyMbox *******************************************************************************************/ void Task1(void *pdata) { static uint8 s_enter_sta = 0; static TouchKey_Sta s_event_input; 17

18 uint16 vx1, vy1; int x1, y1; pdata = pdata; while (1) { // if(getlcd_xy(&vx1, &vy1)==1) { // ( s_enter_sta ) x1 = (vx1 - g_vx_min) * touch_wide / (g_vinx1 - g_vinx0); y1 = (vy1 - g_vy_min) * touch_high / (g_viny1 - g_viny0); if(x1<0) x1 = 0; if(y1<0) y1 = 0; if(x1>319) x1 = 319; if(y1>239) y1 = 239; // s_event_input.sta = 0x81; s_event_input.x = x1; s_event_input.y = y1; OSMboxPost(TouchKeyMbox, (void *)&s_event_input); s_enter_sta = 1; else { if(vy1 == 0) { if(s_enter_sta!= 0) // { s_event_input.sta = 0x01; OSMboxPost(TouchKeyMbox, (void *)&s_event_input); s_enter_sta = 0; // end of if(vy1 == 0)... // end of if(getlcd_xy(&vx1, &vy1)==1)...else... OSTimeDly(5); (9) I 2 C I2C.c I2C.h ZLG7290 ZLG7290.c ZLG7290.h GUI_Sample\src I2C I2C.c ZLG7290.c I2C I 2 C (I2C.c I2C.h ) ZLG7290 (ZLG7290.c ZLG7290.h ) (10) ads7843.c ads7843.h GUI_Sample\src usr GUI_Sample

19 (ads7843.c ads7843.h ) 1.5 GUI_Sample (11) config.h #include "I2C.h" #include "ZLG7290.h" #include "ADS7843.h" target irq.s I 2 C I2c_Handler HANDLER I2c_Exception (12) target target.c VICInit I 2 C 1.5 I2C.c I2cInit() VIC I 2 C I 2 C extern void I2c_Handler(void); VICVectAddr12 = (uint32)i2c_handler; VICVectCntl12 = (0x20 9); //VICIntEnable = 1 << 9; (13) target target.c TargetInit I 2 C( ) I2cInit(30000); I/O 1.6 MiniGUI(for uc/os-ii) commlcd comm I/O 1.6 GUI_Sample I2cInit(30000); // ADS7843 I/O IO2DIR = ADS7843_CS ADS7843_DIN ADS7843_DCLK; OS_EXIT_CRITICAL(); 19

20 (14) Startup.s ResetInit (Bank3 ) GUI_Sample BCFG_FLASH EQU (BCFG_16DEF (0x00<<00) (0x03<<05) (0x02<<11)) BCFG_PSRAM EQU (BCFG_16DEF (0x00<<00) (0x03<<05) (0x02<<11)) BCFG_CS2 EQU (BCFG_16DEF (0x0f<<00) (0x1f<<05) (0x1f<<11)) BCFG_CS3 EQU (BCFG_16DEF (0x03<<00) (0x0F<<05) (0x0F<<11)) (15) uc/os-ii os_cfg.h OS_MAX_TASKS 60 OS_MAX_EVENTS 32 OS_TICKS_PER_SEC 100 (16) GUI_Sample Startup.s IMPORT use_no_semihosting_swi target.c #pragma import( use_no_semihosting_swi) rt_div0 fputc fgetc _sys_close _sys_write _sys_read _ttywrch _sys_istty _sys_seek _sys_ensure _sys_flen _sys_tmpnam _sys_exit _sys_command_string (17) MiniGUI-STR for uc/os-ii GUI_Sample Make GUI_Sample (18) MagicARM2200 (JTAG ) JP3 JP11 JP12 JP5 7843INT P0.30 (19) AXD MiniGUI Hello Hello MiniGUI! messageb.c (20) MiniGUI Enter MagicARM (21) EasyJTAG MiniGUI PC MiniGUI Win32 RedHat Linux 9.0 MiniGUI-STR for Linux MiniGUI-STR for uc/os-ii 20

21 dti.c Linux uc/os-ii /* MiniGUI */ #include"minigui_config.h" #include <minigui/common.h> #include "common.h" #include <minigui/minigui.h> #include "minigui.h" #include <minigui/gdi.h> #include "gdi.h" #include <minigui/window.h> #include "window.h" #include <minigui/control.h> #include "control.h" #ifndef _LITE_VERSION #ifndef _LITE_VERSION #include <minigui/dti.c> #include "dti.c" #endif #endif MiniGUI Win32 (22) MagicARM2200 ZLG/BOOT MiniGUI NAND Flash ZLG/BOOT RAM GUI_Sample Edit DebugInExRam Settings Target Settings Post-linker ARM formelf ARM formelf bin minigui.bin minigui.bin GUI_Sample GUI_Sample\GUI_Sample_Data\DebugInExR am minigui.bin MagicARM2200.pdf minigui.bin boot ZLG_BOOT.INI 1.8 ZLG_BOOT.INI boot 21

22 1.8 MiniGUI #run MiniGUI program for MagicARM2200 load 0x a:\boot\minigui.bin sfr 0xE000C004 0x ;U0IER = 0 sfr 0xE x ;T0TCR = 0 sfr 0xE x000000ff ;T0IR = 0xff sfr 0xFFFFF014 0xffffffff ;VICIntEnClr = 0xffffffff set PC=0x run run MiniGUI program for MagicARM2200 ZLG/BOOT minigui.bin RAM MiniGUI MiniGUI GUI_Sample src messageb.c GUI_Sample messageb.c 7 MiniGUI for uc/os-ii MiniGUI for uc/os-ii /**************************************************************************** * Messageb.C * MiniGUI * (MessageBox) "Hello MiniGUI!" * MiniGUI for uc/os-ii ADS 1.2 ****************************************************************************/ /* MiniGUI ( ) */ #include "MiniGUI_config.h" /* MiniGUI */ #include "common.h" #include "minigui.h" #include "gdi.h" #include "window.h" #include "control.h" /**************************************************************************** 22

23 * MiniGUIMain() * MiniGUI * argc * argv * 0 ****************************************************************************/ int MiniGUIMain(int argc, const char *argv[]) { #ifdef _LITE_VERSION SetDesktopRect(0,0, 800,600); #endif MessageBox(HWND_DESKTOP, "Hello MiniGUI!", "Hello", MB_OK MB_ICONHAND); return(0); #ifndef _LITE_VERSION #include "dti.c" #endif 8 MiniGUI-STR for uc/os-ii dummy 1.2 MiniGUI 1 (1) (2) MiniGUI ( ) (3) MiniGUI MiniGUI 2 PC MagicARM2200 Windows98/XP/2000 ADS 1.2 µc/os-ii (V2.52) MiniGUI-STR(for uc/os-ii) 3 MiniGUI MSG_PAINT MSG_PAINT MSG_PAINT MSG_PAINT : 2 (MSG_LBUTTONDOWN) UpdateWindow ( MSG_PAINT ) 23

24 4 (1) 1 MiniGUI MiniGUI MagicARM2200 (2) <<ARM ( )>> 1 MagicARM2200 (3) MiniGUI <<MiniGUI >> MiniGUI 5 MiniGUI NCREATE CREATE MiniGUI 1) MiniGUI 1.10 ( MSG_CREATE) MiniGUI typedef struct _MSG { HWND hwnd; // int message; // WPARAM wparam; // LPARAM lparam; // unsigned int time; // #ifndef _LITE_VERSION #endif void* MSG; padd; 2) MiniGUI MSG_ MSG_PAINT MSG_LBUTTONDOWN libminigui-str-1.6.2/include/window.h MSG_CREATE MSG_PAINT MSG_COMMAND MSG_INITDIALOG lparam DialogBoxIndirectParam 24

25 return(1) MSG_CHAR TranslateMessage MSG_LBUTTONDOWN ( ) MSG_MOUSEMOVE ( ) MSG_COLSE DestroyMainWindow PostQuitMessage MSG_QUIT ( ) MSG_DESTROY DestroyMainWindow DestroyWindow DestroyIcon DestroyAllControls 3) SendMessage PostMessage SendMessage PostMessage 6 (1) GUI_Sample src paint paint MiniGUI paint.c (2) paint.c GUI_Sample usr usr ( messageb.c) (3) MagicARM2200 (JTAG ) JP3 JP11 JP12 JP5 7843INT P0.30 (4) AXD MiniGUI MSG_PAINT paint.c (5) ( ) MSG_PAINT 1 ZLG/BOO minigui.bin boot ZLG/BOOT RAM 25

26 7 MiniGUI MiniGUI /**************************************************************************** * Paint.C * MiniGUI * MSG_PAINT * * MiniGUI v1.61 for uc/os-ii ADS 1.2 ****************************************************************************/ /* MiniGUI ( ) */ #include "MiniGUI_config.h" /* MiniGUI */ #include "common.h" #include "minigui.h" #include "gdi.h" #include "window.h" #include "control.h" /* */ #define MWINDOW_LX 10 /* x */ #define MWINDOW_TY 50 /* y */ #define MWINDOW_RX 230 /* x */ #define MWINDOW_BY 180 /* y */ HWND hmainwnd; // /**************************************************************************** * WinProc() * * MSG_PAINT * * hwnd * message * wparam 1 * lparam 2 * 0 ****************************************************************************/ static int WinProc(HWND hwnd, int message, WPARAM wparam, LPARAM lparam) { HDC hdc; char disp_buf[50]; static int no = 0; 26

27 switch(message) { case MSG_PAINT: hdc = BeginPaint(hWnd); no++; sprintf(disp_buf, "MSG_PAINT :%d", no); TextOut(hdc, 10, 35, disp_buf); EndPaint(hWnd, hdc); break; case MSG_LBUTTONDOWN: // //InvalidateRect(hWnd, NULL, TRUE); // ( UpdateWindow ) UpdateWindow(hWnd, TRUE); break; case MSG_CLOSE: DestroyMainWindow(hWnd); PostQuitMessage(hWnd); break; default: return(defaultmainwinproc(hwnd, message, wparam, lparam)); return(0); /**************************************************************************** * InitMainWindow() * * * 1 0 ****************************************************************************/ int InitMainWindow(void) { MAINWINCREATE window_info; window_info.dwstyle = WS_VISIBLE WS_BORDER WS_CAPTION; window_info.dwexstyle = WS_EX_NONE; window_info.spcaption = "MSG_PAINT "; window_info.hmenu = 0; window_info.hcursor = 0; window_info.hicon = GetSmallSystemIcon(IDI_APPLICATION); window_info.mainwindowproc = WinProc; window_info.lx = MWINDOW_LX; 27

28 window_info.ty = MWINDOW_TY; window_info.rx = MWINDOW_RX; window_info.by = MWINDOW_BY; window_info.ibkcolor = COLOR_lightwhite; window_info.dwadddata = 0; window_info.hhosting = HWND_DESKTOP; hmainwnd = CreateMainWindow(&window_info); if(hmainwnd == HWND_INVALID) return(0); else return(1); /**************************************************************************** * MiniGUIMain() * MiniGUI * argc * argv * 0 ****************************************************************************/ int MiniGUIMain(int argc, const char *argv[]) { MSG Msg; #ifdef _LITE_VERSION #endif SetDesktopRect(0,0, 800,600); InitMainWindow(); ShowWindow(hMainWnd, SW_SHOWNORMAL); while(getmessage(&msg, hmainwnd)) { TranslateMessage(&Msg); DispatchMessage(&Msg); MainWindowThreadCleanup(hMainWnd); return(0); #ifndef _LITE_VERSION #include "dti.c" #endif 8 MiniGUI GetMessage TranslateMessage DispatchMessage 28

29 1.3 1 MiniGUI 2 PC MagicARM2200 Windows98/XP/2000 ADS 1.2 µc/os-ii (V2.52) MiniGUI-STR(for uc/os-ii) 3 MiniGUI 2 File Help File Exit Help About About ( Menu demo V1.0 ) 4 (1) 1.1 MiniGUI uclinux MagicARM2200 (2) <<ARM ( )>> 1 MagicARM2200 (3) MiniGUI <<MiniGUI >> MiniGUI 5 MiniGUI ( ) CreateMenu CreatePopupMenu hmenu MSG_COMMAND MiniGUI 1. ID MiniGUI ID ID 100 ID ID #define IDM_FILE 2010 #define IDM_EXIT 2011 #define IDM_HELP 2020 #define IDM_ABOUT

30 2. HMENU ( ) CreateMenu MENUITEMINFO mii mii InsertMenuItem 1.13 mii.hsubmenu ( ) MAINWINCREATE hmenu 1.13 HMENU hmenu; MENUITEMINFO mii; hmenu = CreateMenu(); /* "File" */ memset(&mii, 0, sizeof(menuiteminfo)); /* mii 0 */ mii.type = MFT_STRING; mii.id = IDM_FILE; mii.typedata = (DWORD)"File..."; mii.hsubmenu = CreatFileMenu(); /* */ InsertMenuItem(hmenu, 0, TRUE, &mii); /* */ 3. CreatePopupMenu MENUITEMINFO InsertMenuItem 1.14 CreatePopupMenu StripPopupHead 1.14 static HMENU CreatFileMenu(void) { HMENU hmenu; MENUITEMINFO mii; /* "File" */ memset(&mii, 0, sizeof(menuiteminfo)); mii.type = MFT_STRING; mii.id = 0; mii.typedata = (DWORD)"File"; hmenu = CreatePopupMenu(&mii); 30

31 /* "Exit" */ memset(&mii, 0, sizeof(menuiteminfo)); mii.type = MFT_STRING; mii.state = 0; mii.id = IDM_EXIT; mii.typedata = (DWORD)"Exit"; InsertMenuItem(hmenu, 0, TRUE, &mii); return(strippopuphead(hmenu)); case MSG_COMMAND: switch(wparam) { case IDM_EXIT: DestroyMainWindow(hWnd); PostQuitMessage(hWnd); break; case IDM_ABOUT: MessageBox(hWnd, "Menu demo V1.0", "About", MB_OK); break; 6 (1) GUI_Sample src menu menu MiniGUI menu.c (2) menu.c GUI_Sample usr usr ( messageb.c) (3) MagicARM2200 (JTAG ) JP3 JP11 JP12 JP5 7843INT P0.30 (4) AXD MiniGUI menu File Help

32 1.9 menu.c (5) Help About About About About /**************************************************************************** * Menu.C * MiniGUI * * MiniGUI for uc/os-ii ADS 1.2 ****************************************************************************/ #include <string.h> /* MiniGUI ( ) */ #include "MiniGUI_config.h" /* MiniGUI */ #include "common.h" #include "minigui.h" #include "gdi.h" #include "window.h" #include "control.h" /* */ 32

33 #define MWINDOW_LX 5 /* x */ #define MWINDOW_TY 50 /* y */ #define MWINDOW_RX 235 /* x */ #define MWINDOW_BY 200 /* y */ /* ID */ #define IDM_FILE 2010 #define IDM_EXIT 2011 #define IDM_HELP 2020 #define IDM_ABOUT 2021 HWND hmainwnd; // /**************************************************************************** * CreatFileMenu() * "File" * * ****************************************************************************/ static HMENU CreatFileMenu(void) { HMENU hmenu; MENUITEMINFO mii; /* "File" */ memset(&mii, 0, sizeof(menuiteminfo)); // mii 0 mii.type = MFT_STRING; mii.id = 0; mii.typedata = (DWORD)"File"; hmenu = CreatePopupMenu(&mii); /* "Exit" */ memset(&mii, 0, sizeof(menuiteminfo)); mii.type = MFT_STRING; mii.state = 0; mii.id = IDM_EXIT; mii.typedata = (DWORD)"Exit"; InsertMenuItem(hmenu, 0, TRUE, &mii); return(strippopuphead(hmenu)); /**************************************************************************** * CreatAboutMenu() 33

34 * "Help" * * ****************************************************************************/ static HMENU CreatAboutMenu(void) { HMENU hmenu; MENUITEMINFO mii; /* "Help" */ memset(&mii, 0, sizeof(menuiteminfo)); mii.type = MFT_STRING; mii.id = 0; mii.typedata = (DWORD)"Help"; hmenu = CreatePopupMenu(&mii); /* "About" */ memset(&mii, 0, sizeof(menuiteminfo)); mii.type = MFT_STRING; mii.state = 0; mii.id = IDM_ABOUT; mii.typedata = (DWORD)"About"; InsertMenuItem(hmenu, 0, TRUE, &mii); return(strippopuphead(hmenu)); /**************************************************************************** * CreateMainMenu() * ( ) * * ****************************************************************************/ static HMENU CreateMainMenu(void) { HMENU hmenu; MENUITEMINFO mii; hmenu = CreateMenu(); /* "File" */ memset(&mii, 0, sizeof(menuiteminfo)); // mii 0 mii.type = MFT_STRING; mii.id = IDM_FILE; mii.typedata = (DWORD)"File..."; 34

35 mii.hsubmenu = CreatFileMenu(); InsertMenuItem(hmenu, 0, TRUE, &mii); // /* "Help" */ memset(&mii, 0, sizeof(menuiteminfo)); mii.type = MFT_STRING; mii.id = IDM_HELP; mii.typedata = (DWORD)"Help..."; mii.hsubmenu = CreatAboutMenu(); InsertMenuItem(hmenu, 1, TRUE, &mii); return(hmenu); /**************************************************************************** * WinProc() * * MSG_COMMAND * hwnd * message * wparam 1 * lparam 2 * 0 ****************************************************************************/ static int WinProc(HWND hwnd, int message, WPARAM wparam, LPARAM lparam) { HDC hdc; switch(message) { case MSG_PAINT: hdc = BeginPaint(hWnd); TextOut(hdc, 10, 50, "This is MiniGUI Window!"); EndPaint(hWnd, hdc); break; case MSG_CLOSE: DestroyMainWindow(hWnd); PostQuitMessage(hWnd); break; case MSG_COMMAND: switch(wparam) { case IDM_EXIT: DestroyMainWindow(hWnd); 35

36 PostQuitMessage(hWnd); break; case IDM_ABOUT: MessageBox(hWnd, "Menu demo V1.0", "About", MB_OK); break; break; default: return(defaultmainwinproc(hwnd, message, wparam, lparam)); return(0); /**************************************************************************** * InitMainWindow() * * * 1 0 ****************************************************************************/ int InitMainWindow(void) { MAINWINCREATE window_info; window_info.dwstyle = WS_VISIBLE WS_BORDER WS_CAPTION; window_info.dwexstyle = WS_EX_NONE; window_info.spcaption = "Menu demo"; // window_info.hmenu = CreateMainMenu(); // window_info.hcursor = 0; window_info.hicon = 0; window_info.mainwindowproc = WinProc; window_info.lx = MWINDOW_LX; window_info.ty = MWINDOW_TY; window_info.rx = MWINDOW_RX; window_info.by = MWINDOW_BY; window_info.ibkcolor = COLOR_lightwhite; window_info.dwadddata = 0; window_info.hhosting = HWND_DESKTOP; hmainwnd = CreateMainWindow (&window_info); if (hmainwnd == HWND_INVALID) return(0); else return(1); 36

37 /**************************************************************************** * MiniGUIMain() * MiniGUI * argc * argv * 0 ****************************************************************************/ int MiniGUIMain(int argc, const char *argv[]) { MSG Msg; #ifdef _LITE_VERSION #endif SetDesktopRect(0,0, 800,600); InitMainWindow(); ShowWindow(hMainWnd, SW_SHOWNORMAL); while (GetMessage(&Msg, hmainwnd)) { TranslateMessage(&Msg); DispatchMessage(&Msg); MainWindowThreadCleanup (hmainwnd); return(0); #ifndef _LITE_VERSION #include "dti.c" #endif 8 MiniGUI StripPopupHead (1) MiniGUI (2) MiniGUI 37

38 2 PC MagicARM2200 Windows98/XP/2000 ADS 1.2 µc/os-ii (V2.52) MiniGUI-STR(for uc/os-ii) 3 MiniGUI OK CANCEL This is MiniGUI dlg! ( MiniGUI static ) 4 (1) 1 MiniGUI MiniGUI MagicARM2200 (2) <<ARM ( )>> 1 MagicARM2200 (3) MiniGUI <<MiniGUI >> MiniGUI 5 MiniGUI ( ) MiniGUI DLGTEMPLATE CTRLDATA ( ) InitDialogBox ( ) ( ) ( EndDialog ) MiniGUI 1) ID ID ID MiniGUI windows.h ID IDOK IDCANCEL IDABORT ID 1.17 ID #define IDC_DISP ) DLGTEMPLATE NULL InitDialogBox

39 static DLGTEMPLATE DlgInitProgress = { WS_BORDER WS_CAPTION, /* */ WS_EX_NONE, /* */ 100, 100, 200, 130, /* */ "Dlg demo", /* */ 0, /* */ 0, /* */ 3, /* */ NULL, /* */ 0 /* */ ; 3) ( static ) 1.19 MiniGUI static ( ) button ( ) 1.19 static CTRLDATA CtrlInitData[] = { { "static", /* */ WS_VISIBLE SS_SIMPLE, /* */ 50,30, 100, 16, /* */ IDC_DISP1, /* ID */ "This is MiniGUI dlg!", /* */ 0, /* */ WS_EX_NONE /* */, { "button", WS_TABSTOP WS_VISIBLE BS_DEFPUSHBUTTON, 40,70, 50,25, IDOK, "OK", 0, WS_EX_NONE, ; 4) MSG_INITDIALOG MSG_COMMAND MSG_INITDIALOG 1 return(1); MSG_COMMAND EndDialog 39

40 static int DialogBoxProc(HWND hdlg, int message, WPARAM wparam, LPARAM lparam) { switch(message) { case MSG_INITDIALOG: return(1); case MSG_COMMAND: switch(wparam) { case IDOK: case IDCANCEL: EndDialog(hdlg, wparam); DestroyAllControls(hdlg); break; break; return(defaultdialogproc(hdlg, message, wparam, lparam)); 5) InitDialogBox ( DLGTEMPLATE ) DlgInitProgress.controls = CtrlInitData; /* */ /* "DlgInitProgress" */ DialogBoxIndirectParam(&DlgInitProgress, hwnd, DialogBoxProc, 0L); 6 (1) GUI_Sample src dlg dlg MiniGUI dlg.c (2) dlg.c GUI_Sample usr usr ( messageb.c) (3) MagicARM2200 (JTAG ) JP3 JP11 JP12 JP5 7843INT P0.30 (4) AXD MiniGUI

41 1.11 dlg.c (5) ( ) dlg.c (6) OK CANCEL ZLG/BOO minigui.bin boot ZLG/BOOT RAM /**************************************************************************** * Dlg.C * MiniGUI * 2 1 * MiniGUI for uc/os-ii ADS 1.2 ****************************************************************************/ /* MiniGUI ( ) */ #include "MiniGUI_config.h" /* MiniGUI */ #include "common.h" #include "minigui.h" #include "gdi.h" #include "window.h" #include "control.h" 41

42 /* */ #define MWINDOW_LX 5 /* x */ #define MWINDOW_TY 50 /* y */ #define MWINDOW_RX 235 /* x */ #define MWINDOW_BY 200 /* y */ /* ID */ #define IDC_DISP HWND hmainwnd; // /* */ static DLGTEMPLATE DlgInitProgress = { WS_BORDER WS_CAPTION, // WS_EX_NONE, // 10, 10, 200, 130, // "Dlg demo", // 0, // 0, // 3, // NULL, // 0 // ; /* */ static CTRLDATA CtrlInitData[] = { { "static", WS_VISIBLE SS_SIMPLE, 10,30, 160, 16, IDC_DISP1, "This is MiniGUI dlg!", 0, WS_EX_NONE, { "button", WS_TABSTOP WS_VISIBLE BS_DEFPUSHBUTTON, 30,70, 60,25, IDOK, "OK", 0, WS_EX_NONE, 42

43 ; { "button", WS_TABSTOP WS_VISIBLE, 110,70, 60,25, IDCANCEL, "CANCEL", 0, WS_EX_NONE /**************************************************************************** * DialogBoxProc() * * MSG_COMMAND * hwnd * message * wparam 1 * lparam 2 * ****************************************************************************/ static int DialogBoxProc(HWND hdlg, int message, WPARAM wparam, LPARAM lparam) { switch(message) { case MSG_INITDIALOG: return(1); case MSG_COMMAND: switch(wparam) { case IDOK: case IDCANCEL: EndDialog(hdlg, wparam); DestroyAllControls(hdlg); break; break; return(defaultdialogproc(hdlg, message, wparam, lparam)); /**************************************************************************** * InitDialogBox() * 43

44 * hwnd * ****************************************************************************/ static void InitDialogBox(HWND hwnd) { DlgInitProgress.controls = CtrlInitData; // /* "DlgInitProgress" */ DialogBoxIndirectParam(&DlgInitProgress, hwnd, DialogBoxProc, 0L); /**************************************************************************** * WinProc() * * MSG_LBUTTONDOWN * hwnd * message * wparam 1 * lparam 2 * 0 ****************************************************************************/ static int WinProc(HWND hwnd, int message, WPARAM wparam, LPARAM lparam) { HDC hdc; switch(message) { case MSG_PAINT: hdc = BeginPaint(hWnd); TextOut(hdc, 10, 50, "This is MiniGUI Window!"); EndPaint(hWnd, hdc); break; case MSG_CLOSE: DestroyMainWindow(hWnd); PostQuitMessage(hWnd); break; case MSG_LBUTTONDOWN: InitDialogBox(hWnd); break; default: return(defaultmainwinproc(hwnd, message, wparam, lparam)); return(0); 44

45 /**************************************************************************** * InitMainWindow() * * * 1 0 ****************************************************************************/ int InitMainWindow(void) { MAINWINCREATE window_info; window_info.dwstyle = WS_VISIBLE WS_BORDER WS_CAPTION; window_info.dwexstyle = WS_EX_NONE; window_info.spcaption = " window_info.hmenu = 0; window_info.hcursor = 0; window_info.hicon = 0; window_info.mainwindowproc = WinProc; window_info.lx = MWINDOW_LX; window_info.ty = MWINDOW_TY; window_info.rx = MWINDOW_RX; window_info.by = MWINDOW_BY; window_info.ibkcolor = COLOR_lightwhite; window_info.dwadddata = 0; window_info.hhosting = HWND_DESKTOP; hmainwnd = CreateMainWindow (&window_info); if (hmainwnd == HWND_INVALID) return(0); else return(1); /**************************************************************************** * MiniGUIMain() * MiniGUI * argc * argv * 0 ****************************************************************************/ int MiniGUIMain(int argc, const char *argv[]) { MSG Msg; #ifdef _LITE_VERSION SetDesktopRect(0,0, 800,600); 45

46 #endif InitMainWindow(); ShowWindow(hMainWnd, SW_SHOWNORMAL); while (GetMessage(&Msg, hmainwnd)) { TranslateMessage(&Msg); DispatchMessage(&Msg); MainWindowThreadCleanup (hmainwnd); return(0); #ifndef _LITE_VERSION #include "dti.c" #endif 8 (1) MiniGUI ( ) (2) Hello OK (1) MiniGUI (2) MiniGUI 2 PC MagicARM2200 Windows98/XP/2000 ADS 1.2 µc/os-ii (V2.52) MiniGUI-STR(for uc/os-ii) 3 MiniGUI Login ( ) ( ) 4 (1) 1 MiniGUI MiniGUI MagicARM

47 (2) <<ARM ( )>> 1 MagicARM2200 (3) MiniGUI <<MiniGUI >> MiniGUI 5 MiniGUI MiniGUI WS_xxx SS_SIMPLE SS_LEFT SS_CENTER SS_RIGHT SS_BITMAP SS_ICON ( ) CreateWindow SetWindowText 1.23 { "static", /* */ WS_VISIBLE SS_SIMPLE, /* */ 65,10, 200, 16, /* */ IDC_SLOGIN, /* ID */ ".", /* */ 0, /* */ WS_EX_NONE /* */ 1.24 CreateWindow CreateWindow( CTRL_STATIC, ".", WS_CHILD WS_VISIBLE SS_SIMPLE, IDC_SLOGIN, 65,10, 200, 16, hwnd, 0 ); 47

48 MiniGUI ( ) CreateWindow /OK /CANCEL WS_xxx WS_VISIBLE WS_TABSTOP BS_PUSHBUTTON BS_DEFPUSHBUTTON MiniGUI ( edit ) ( sledit ) ( mledit ) WS_xxx ES_UPPERCASE ES_LOWERCASE ES_PASSWORD * ES_AUTOWRAP ( ) MSG_GETTEXTLENGTH MSG_GETTEXT MSG_SETTEXT GetWindowTextLength GetWindowText SetWindowText 6 (1) GUI_Sample src login login MiniGUI login.c (2) login.c GUI_Sample usr usr ( messageb.c) (3) MagicARM2200 (JTAG ) JP3 JP11 JP12 JP5 7843INT P0.30 (4) AXD MiniGUI login

49 1.13 (5) MiniGUI MagicARM ZLG/BOO minigui.bin boot ZLG/BOOT RAM /**************************************************************************** * Login.C * MiniGUI * MiniGUI Login * MiniGUI for uc/os-ii ADS 1.2 ****************************************************************************/ /* MiniGUI ( ) */ #include "MiniGUI_config.h" /* MiniGUI */ #include "common.h" #include "minigui.h" #include "gdi.h" #include "window.h" #include "control.h" #include <string.h> HWND hmainwnd; #define IDC_SLOGIN 300 #define IDC_SUSER301 #define IDC_SPASS 302 #define IDC_EUSER 401 #define IDC_EPASS 402 // static DLGTEMPLATE MyDlg = { WS_BORDER WS_CAPTION, WS_EX_NONE, 2, 50, 235, 190, " ", 49

50 ; 0, 0, 6, NULL, 0 // static CTRLDATA CtrlInitData[] = { { "static", WS_VISIBLE SS_SIMPLE, 25,10, 200, 16, IDC_SLOGIN, ".", 0, WS_EX_NONE, { "static", WS_VISIBLE SS_SIMPLE, 10,40, 60, 16, IDC_SUSER, " :", 0, WS_EX_NONE, { "static", WS_VISIBLE SS_SIMPLE, 10,80, 60, 16, IDC_SPASS, " :", 0, WS_EX_NONE, { "edit", WS_CHILD WS_VISIBLE WS_BORDER WS_TABSTOP, 70,40, 140,25, IDC_EUSER, "", 0, WS_EX_NONE, { "edit", WS_CHILD WS_VISIBLE WS_BORDER ES_PASSWORD WS_TABSTOP, 50

51 ; 70,80, 140,25, IDC_EPASS, "", 0, WS_EX_NONE, { "button", WS_VISIBLE WS_TABSTOP BS_DEFPUSHBUTTON, 80,120, 80,25, IDOK, " ", 0, WS_EX_NONE #define USER_NO 3 static char *g_user[user_no] = {"root", "51", "WXM" ; static char *g_pass[user_no] = {"******", "888888", "2046" ; static BOOL CheckUser(char *user, char *pass) { int i; if(user_no==0) return(true); // for(i=0; i<user_no; i++) { if(strcmp(user, g_user[i]) == 0) { if(strcmp(pass, g_pass[i]) == 0) return(true); else return(false); return(false); static int MyDlgProc(HWND hdlg, int message, WPARAM wparam, LPARAM lparam) { char user[30]; char pass[30]; 51

52 switch(message) { case MSG_INITDIALOG: return(1); case MSG_COMMAND: switch(loword(wparam)) { case IDC_EUSER: // (EN_ENTER) case IDC_EPASS: if(hiword(wparam)!= EN_ENTER) break; case IDOK: // GetWindowText(GetDlgItem(hDlg, IDC_EUSER), user, 22); GetWindowText(GetDlgItem(hDlg, IDC_EPASS), pass, 22); if(checkuser(user, pass)) { EndDialog(hDlg, wparam); DestroyAllControls(hDlg); else { MessageBox(hDlg, "!", " ", MB_OK MB_ICONHAND); SetWindowText(GetDlgItem(hDlg, IDC_EUSER), ""); SetWindowText(GetDlgItem(hDlg, IDC_EPASS), ""); break; default: break; break; default: break; return(defaultdialogproc(hdlg, message, wparam, lparam)); static void LoginBox(HWND hwnd) { MyDlg.controls = CtrlInitData; DialogBoxIndirectParam(&MyDlg, hwnd, MyDlgProc, 0L); static char *hello_str = "!"; static int WinProc(HWND hwnd, int message, WPARAM wparam, LPARAM lparam) { HDC hdc; 52

53 switch(message) { case MSG_PAINT: hdc = BeginPaint(hWnd); TextOut(hdc, 50, 50, hello_str); EndPaint(hWnd, hdc); break; case MSG_CLOSE: DestroyMainWindow(hWnd); PostQuitMessage(hWnd); break; default: return(defaultmainwinproc(hwnd, message, wparam, lparam)); return(0); int InitMainWindow(void) { MAINWINCREATE window_info; window_info.dwstyle = WS_VISIBLE WS_BORDER WS_CAPTION; window_info.dwexstyle = WS_EX_NONE; window_info.spcaption = "MiniGUI"; window_info.hmenu = 0; window_info.hcursor = 0; window_info.hicon = 0; window_info.mainwindowproc = WinProc; window_info.lx = 2; window_info.ty = 50; window_info.rx = 238; window_info.by = 200; window_info.ibkcolor = COLOR_lightwhite; window_info.dwadddata = 0; window_info.hhosting = HWND_DESKTOP; hmainwnd = CreateMainWindow (&window_info); if (hmainwnd == HWND_INVALID) return(0); else return(1); int MiniGUIMain(int argc, const char *argv[]) { MSG Msg; 53

54 #ifdef _LITE_VERSION #endif SetDesktopRect(0,0, 800,600); LoginBox(HWND_DESKTOP); InitMainWindow(); ShowWindow(hMainWnd, SW_SHOWNORMAL); while (GetMessage(&Msg, hmainwnd)) { TranslateMessage(&Msg); DispatchMessage(&Msg); MainWindowThreadCleanup (hmainwnd); return(0); #ifndef _LITE_VERSION #include "dti.c" #endif 8 ( 3 ) MiniGUI 2 PC MagicARM2200 Windows98/XP/2000 ADS 1.2 µc/os-ii (V2.52) MiniGUI-STR(for uc/os-ii) 3 my control MiniGUI 4 (1) 1 MiniGUI MiniGUI MagicARM2200 (2) <<ARM ( )>> 1 MagicARM

55 (3) MiniGUI <<MiniGUI >> 5 MiniGUI ( ) MiniGUI 1) WNDCLASS WNDCLASS MyClass; MyClass.spClassName = MYC_STATIC; // MyClass.dwStyle = WS_NONE; // MyClass.dwExStyle = WS_EX_NONE; // MyClass.hCursor = GetSystemCursor (IDC_BUSY);// MyClass.iBkColor = COLOR_lightwhite; // MyClass.WinProc = MyControlProc; // 2) RegisterWindowClass RegisterWindowClass (&MyClass); 3) DefaultControlProc static int MyControlProc(HWND hwnd, int message, WPARAM wparam, LPARAM lparam) { HDC hdc; switch (message) { case MSG_PAINT: hdc = BeginPaint (hwnd); 55

56 TextOut (hdc, 0, 0, "my control"); EndPaint (hwnd, hdc); Return(0); return(defaultcontrolproc (hwnd, message, wparam, lparam)); 1.29 #define RTC_SETTIME 800 #define RTC_GETTIME 801 #define RTC_SETHOUR 802 #define RTC_SETMIN 803 #define RTC_SETSEC 804 4) CreateWindow CreateWindow CreateWindow( MYC_STATIC, // "", // WS_VISIBLE WS_BORDER, // IDC_STATIC1, // ID 100, 100, 100, 20, // hwnd, // 0); // 5) DestroyWindow DestroyAllControls 6 (1) GUI_Sample src control control MiniGUI control.c (2) control.c GUI_Sample usr usr ( messageb.c) (3) MagicARM2200 (JTAG ) JP3 JP11 JP12 JP5 7843INT P0.30 (4) AXD MiniGUI

57 1.14 control.c ZLG/BOO minigui.bin boot ZLG/BOOT RAM /**************************************************************************** * Control.C * MiniGUI * ( ) MiniGUI * MiniGUI for uc/os-ii ADS 1.2 ****************************************************************************/ /* MiniGUI ( ) */ #include "MiniGUI_config.h" /* MiniGUI */ #include "common.h" #include "minigui.h" #include "gdi.h" #include "window.h" #include "control.h" #define MYC_STATIC #define IDC_STATIC "MYSTATIC1" HWND hmainwnd; static int MyControlProc(HWND hwnd, int message, WPARAM wparam, LPARAM lparam) { HDC hdc; switch (message) { case MSG_PAINT: 57

58 hdc = BeginPaint (hwnd); TextOut (hdc, 0, 0, "my control"); EndPaint (hwnd, hdc); return(0); return(defaultcontrolproc (hwnd, message, wparam, lparam)); static BOOL RegisterMyControl(void) { WNDCLASS MyClass; MyClass.spClassName = MYC_STATIC; MyClass.dwStyle = WS_NONE; MyClass.dwExStyle = WS_EX_NONE; MyClass.hCursor = GetSystemCursor (IDC_BUSY); MyClass.iBkColor = COLOR_lightwhite; MyClass.WinProc = MyControlProc; return(registerwindowclass (&MyClass)); static void UnregisterMyControl(void) { UnregisterWindowClass (MYC_STATIC); static int WinProc(HWND hwnd, int message, WPARAM wparam, LPARAM lparam) { switch(message) { case MSG_CREATE: CreateWindow(MYC_STATIC, "", WS_VISIBLE WS_BORDER, IDC_STATIC1, 50, 50, 100, 20, hwnd, 0); break; case MSG_DESTROY: DestroyAllControls(hWnd); break; case MSG_CLOSE: DestroyMainWindow(hWnd); PostQuitMessage(hWnd); break; 58

59 default: return(defaultmainwinproc(hwnd, message, wparam, lparam)); return(0); int InitMainWindow(void) { MAINWINCREATE window_info; window_info.dwstyle = WS_VISIBLE WS_BORDER WS_CAPTION; window_info.dwexstyle = WS_EX_NONE; window_info.spcaption = "MiniGUI"; window_info.hmenu = 0; window_info.hcursor = 0; window_info.hicon = 0; window_info.mainwindowproc = WinProc; window_info.lx = 5; window_info.ty = 50; window_info.rx = 235; window_info.by = 200; window_info.ibkcolor = COLOR_lightwhite; window_info.dwadddata = 0; window_info.hhosting = HWND_DESKTOP; hmainwnd = CreateMainWindow (&window_info); if (hmainwnd == HWND_INVALID) return(0); else return(1); int MiniGUIMain(int argc, const char *argv[]) { MSG Msg; #ifdef _LITE_VERSION #endif SetDesktopRect(0,0, 800,600); RegisterMyControl(); InitMainWindow(); ShowWindow(hMainWnd, SW_SHOWNORMAL); while (GetMessage(&Msg, hmainwnd)) { TranslateMessage(&Msg); DispatchMessage(&Msg); 59

60 MainWindowThreadCleanup (hmainwnd); UnregisterMyControl(); return(0); #ifndef _LITE_VERSION #include "dti.c" #endif 8 ( ) STM_SETIMAGE MiniGUI 2 PC MagicARM2200 Windows98/XP/2000 ADS 1.2 µc/os-ii (V2.52) MiniGUI-STR(for uc/os-ii) 3 MiniGUI 4 (1) 1 MiniGUI MiniGUI MagicARM2200 (2) <<ARM ( )>> 1 MagicARM2200 (3) MiniGUI <<MiniGUI >> 5 MiniGUI MSG_KEYDOWN( ) MSG_KEYUP( ) MSG_SYSKEYDOWN( ALT ) MSG_SYSKEYUP( ) MSG_CHAR MSG_SYSCHAR 60

61 TranslateMessage TranslateMessage MSG_KEYDOWN MSG_SYSKEYDOWN ( wparam ) MiniGUI case MSG_CHAR: /* */ if(wparam==127) /* Back Space */ { if(no>0) { no--; str_buf[no] = ''; else /* Back Space */ { str_buf[no++] = wparam; /* str_buf */ str_buf[no] = '\0'; if( ((no%30) == 0) /* 30 */ (wparam == 0x0D ) /* */ ) { if(no>0) { y = y + char_h; no = 0; sprintf(str_buf, ""); hdc = BeginPaint(hWnd); TextOut(hdc, 0, y, str_buf); /* */ EndPaint(hWnd, hdc); SetCaretPos(hWnd, no * char_w, y); /* */ break; 6 (1) GUI_Sample src sedit sedit MiniGUI sedit.c (2) sedit.c GUI_Sample usr usr ( messageb.c) (3) MagicARM2200 (JTAG ) JP3 JP11 JP12 JP5 7843INT P0.30 (4) AXD MiniGUI sedit 61

62 sedit.c (5) 0 9 MagicARM ZLG/BOO minigui.bin boot ZLG/BOOT RAM /**************************************************************************** * Sedit.C * MiniGUI * MiniGUI * * MiniGUI for uc/os-ii ADS 1.2 ****************************************************************************/ /* MiniGUI ( ) */ #include "MiniGUI_config.h" /* MiniGUI */ #include "common.h" #include "minigui.h" #include "gdi.h" #include "window.h" #include "control.h" HWND hmainwnd; static int WinProc(HWND hwnd, int message, WPARAM wparam, LPARAM lparam) { HDC hdc; static char str_buf[1000]; 62

63 static int no; static int y; static int char_w, char_h; switch(message) { case MSG_CREATE: CreateCaret(hWnd, NULL, 2, GetSysCharHeight()); SetCaretBlinkTime(hWnd, 500); char_w = GetSysCharWidth(); char_h = GetSysCharHeight(); sprintf(str_buf, ""); no = 0; y = 0; break; // create the caret is 2(width) case MSG_PAINT: hdc = BeginPaint(hWnd); TextOut(hdc, 0, y, str_buf); EndPaint(hWnd, hdc); SetCaretPos(hWnd, 0,0); break; case MSG_SETFOCUS: ShowCaret(hWnd); break; case MSG_KILLFOCUS: HideCaret(hWnd); break; case MSG_CLOSE: DestroyCaret(hWnd); DestroyMainWindow(hWnd); PostQuitMessage(hWnd); break; // destroy the caret case MSG_CHAR: if(wparam==127) { if(no>0) { no--; str_buf[no] = ''; else 63

64 { str_buf[no++] = wparam; str_buf[no] = '\0'; if( ((no%30) == 0) (wparam == 0x0D ) ) { if(no>0) { y = y + char_h; no = 0; str_buf[0] = '\0'; hdc = BeginPaint(hWnd); TextOut(hdc, 0, y, str_buf); EndPaint(hWnd, hdc); SetCaretPos(hWnd, no * char_w, y); break; default: return(defaultmainwinproc(hwnd, message, wparam, lparam)); return(0); int InitMainWindow(void) { MAINWINCREATE window_info; window_info.dwstyle = WS_VISIBLE WS_BORDER WS_CAPTION; window_info.dwexstyle = WS_EX_IMECOMPOSE; window_info.spcaption = "Please input the key"; window_info.hmenu = 0; window_info.hcursor = 0; window_info.hicon = 0; window_info.mainwindowproc = WinProc; window_info.lx = 0; window_info.ty = 50; window_info.rx = 239; window_info.by = 250; window_info.ibkcolor = COLOR_lightwhite; window_info.dwadddata = 0; window_info.hhosting = HWND_DESKTOP; 64

65 hmainwnd = CreateMainWindow (&window_info); if (hmainwnd == HWND_INVALID) return(0); else return(1); int MiniGUIMain(int argc, const char *argv[]) { MSG Msg; #ifdef _LITE_VERSION #endif SetDesktopRect(0,0, 800,600); InitMainWindow(); ShowWindow(hMainWnd, SW_SHOWNORMAL); while (GetMessage(&Msg, hmainwnd)) { TranslateMessage(&Msg); DispatchMessage(&Msg); MainWindowThreadCleanup (hmainwnd); return(0); #ifndef _LITE_VERSION #include "dti.c" #endif MiniGUI API 2 PC MagicARM2200 Windows98/XP/2000 ADS 1.2 µc/os-ii (V2.52) MiniGUI-STR(for uc/os-ii) 65

66 3 MiniGUI Linux ( MiniGUI-STR (for ulinux) logo256-s.bmp) 4 (1) 1 MiniGUI MiniGUI MagicARM2200 (2) <<ARM ( )>> 1 MagicARM2200 (3) MiniGUI <<MiniGUI >> 5 MiniGUI BMP JPG GIF PCX MiniGUI File( ) Memory( ) MiniGUI for uc/os-ii BMP BMP ( ) C LoadBitmapFromMemory BMP FillBoxWithBitmap BMP UnloadBitmap MiniGUI 6 (1) GUI_Sample src dispbmp dispbmp MiniGUI DispBmp.c GUI_Sample usr (2) BMP logo256-s.bmp D BintoArray.exe D:\ logo256-s.bmp 1.16 Change D:\logo256-s.bmp.h logo256-s.bmp 1.34 BMP /* File D:\logo256-s.bmp.h */ /* Byte's number(dec)=8816 */ 66

67 unsigned char array[]={ 0x42, 0x4d, 0x70, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x04, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x78, 0x00, (3) D:\logo256-s.bmp.h GUI_Sample src\dispbmp logo256-s.c (4) logo256-s.c 1.35 bmp1_data BMP sz_bmp1 bmp1_data ( BMP ) 1.35 logo256-s.c /* File D:\logo256-s.bmp.h */ /* Byte's number(dec)=8816 */ const unsigned int sz_bmp1 = 8816; const unsigned char bmp1_data[]={ 0x42,0x4d,0x70,0x22,0x00,0x00,0x00,0x00,0x00,0x00, 0x36,0x04,0x00,0x00,0x28,0x00,0x00,0x00,0x78,0x00, (5) logo256-s.c GUI_Sample usr (6) MagicARM2200 (JTAG ) JP3 JP11 JP12 JP5 7843INT P0.30 (7) AXD MiniGUI DispBmp.c ZLG/BOO minigui.bin boot ZLG/BOOT RAM

68 /**************************************************************************** * DispBmp.C * MiniGUI * LoadBitmapFromMem BMP ( ) * FillBoxWithBitmap * MiniGUI for uc/os-ii ADS 1.2 ****************************************************************************/ /* MiniGUI ( ) */ #include "MiniGUI_config.h" /* MiniGUI */ #include "common.h" #include "minigui.h" #include "gdi.h" #include "window.h" #include "control.h" /* */ #define MWINDOW_LX 20 /* x */ #define MWINDOW_TY 00 /* y */ #define MWINDOW_RX 220 /* x */ #define MWINDOW_BY 239 /* y */ /* bmp */ extern const unsigned int sz_bmp1; extern const unsigned char bmp1_data[]; HWND hmainwnd; // /**************************************************************************** * WinProc() * * MSG_PAINT BMP * hwnd * message * wparam 1( ) * lparam 2( ) * 0 ****************************************************************************/ static int WinProc(HWND hwnd, int message, WPARAM wparam, LPARAM lparam) { static BITMAP s_bmp; HDC hdc; // 68

69 switch(message) { case MSG_CREATE: if(loadbitmapfrommem( HDC_SCREEN, &s_bmp, bmp1_data, sz_bmp1, "bmp")) { return(-1); break; // // BITMAP // // // case MSG_PAINT: hdc = BeginPaint(hWnd); // hdc FillBoxWithBitmap (hdc, 7, 10, 120, 141, &s_bmp); // EndPaint(hWnd, hdc); // hdc break; case MSG_CLOSE: UnloadBitmap (&s_bmp); DestroyMainWindow(hWnd); PostQuitMessage(hWnd); break; // // MSG_QUIT " " default: return(defaultmainwinproc(hwnd, message, wparam, lparam)); return(0); /**************************************************************************** * InitMainWindow() * * * 1 0 ****************************************************************************/ int InitMainWindow(void) { MAINWINCREATE window_info; window_info.dwstyle = WS_VISIBLE WS_BORDER WS_CAPTION; window_info.dwexstyle = WS_EX_NONE; window_info.spcaption = "MiniGUI"; window_info.hmenu = 0; window_info.hcursor = 0; window_info.hicon = 0; 69

Microsoft Word - MiniGUI_for_uCOS实验.doc

Microsoft Word - MiniGUI_for_uCOS实验.doc 第 1 章 MiniGUI 图形界面实验 1.1 MiniGUI for uc/os-ii 移植实验 1. 实验目的 (1) 了解 MiniGUI 的基本特点和 MiniGUI 源文件目录结构 (2) 掌握 MiniGUI for uc/os-ii 移植的基本方法和应用配置 2. 实验设备 硬件 :PC 机一台 SmartARM2200 教学实验开发平台一套 软件 :Windows98/XP/2000

More information

PowerPoint 演示文稿

PowerPoint 演示文稿 嵌入式系统 嵌入式 GUI 浙江大学计算机学院陈文智 chenwz@zju.edu.cn 提纲 嵌入式 GUI 概述 MiniGUI 概述 MiniGUI 架构 MiniGUI 使用 MiniGUI 编程 1 嵌入式 GUI 概述 GUI 的出现是 PC 应用的一个分水岭 嵌入式平台上的 GUI 具备轻小型 占用资源少 高性能 高可靠性和可配置性等嵌入式平台所特有的优点 一般针对特定的硬件设备或环境,

More information

int *p int a 0x00C7 0x00C7 0x00C int I[2], *pi = &I[0]; pi++; char C[2], *pc = &C[0]; pc++; float F[2], *pf = &F[0]; pf++;

int *p int a 0x00C7 0x00C7 0x00C int I[2], *pi = &I[0]; pi++; char C[2], *pc = &C[0]; pc++; float F[2], *pf = &F[0]; pf++; Memory & Pointer trio@seu.edu.cn 2.1 2.1.1 1 int *p int a 0x00C7 0x00C7 0x00C7 2.1.2 2 int I[2], *pi = &I[0]; pi++; char C[2], *pc = &C[0]; pc++; float F[2], *pf = &F[0]; pf++; 2.1.3 1. 2. 3. 3 int A,

More information

FY.DOC

FY.DOC 高 职 高 专 21 世 纪 规 划 教 材 C++ 程 序 设 计 邓 振 杰 主 编 贾 振 华 孟 庆 敏 副 主 编 人 民 邮 电 出 版 社 内 容 提 要 本 书 系 统 地 介 绍 C++ 语 言 的 基 本 概 念 基 本 语 法 和 编 程 方 法, 深 入 浅 出 地 讲 述 C++ 语 言 面 向 对 象 的 重 要 特 征 : 类 和 对 象 抽 象 封 装 继 承 等 主

More information

华恒家庭网关方案

华恒家庭网关方案 LINUX V1.5 1 2 1 2 LINUX WINDOWS PC VC LINUX WINDOWS LINUX 90% GUI LINUX C 3 REDHAT 9 LINUX PC TFTP/NFS http://www.hhcn.com/chinese/embedlinux-res.html minicom NFS mount C HHARM9-EDU 1 LINUX HHARM9-EDU

More information

CC213

CC213 : (Ken-Yi Lee), E-mail: feis.tw@gmail.com 49 [P.51] C/C++ [P.52] [P.53] [P.55] (int) [P.57] (float/double) [P.58] printf scanf [P.59] [P.61] ( / ) [P.62] (char) [P.65] : +-*/% [P.67] : = [P.68] : ,

More information

1 Project New Project 1 2 Windows 1 3 N C test Windows uv2 KEIL uvision2 1 2 New Project Ateml AT89C AT89C51 3 KEIL Demo C C File

1 Project New Project 1 2 Windows 1 3 N C test Windows uv2 KEIL uvision2 1 2 New Project Ateml AT89C AT89C51 3 KEIL Demo C C File 51 C 51 51 C C C C C C * 2003-3-30 pnzwzw@163.com C C C C KEIL uvision2 MCS51 PLM C VC++ 51 KEIL51 KEIL51 KEIL51 KEIL 2K DEMO C KEIL KEIL51 P 1 1 1 1-1 - 1 Project New Project 1 2 Windows 1 3 N C test

More information

新・明解C言語入門編『索引』

新・明解C言語入門編『索引』 !... 75!=... 48 "... 234 " "... 9, 84, 240 #define... 118, 213 #include... 148 %... 23 %... 23, 24 %%... 23 %d... 4 %f... 29 %ld... 177 %lf... 31 %lu... 177 %o... 196 %p... 262 %s... 242, 244 %u... 177

More information

ARM JTAG实时仿真器安装使用指南

ARM JTAG实时仿真器安装使用指南 ARM JTAG Version 1.31 2003. 11. 12 ARM JTAG ARM JTAG.3 ARM 2.1.4 2.2.4 ARM JTAG 3.1 18 3.2 18 3.2.1 Multi-ICE Server.18 3.2.2 ADS..21 ARM JTAG 4.1 Multi-ICE Server 33 4.1.1 Multi-ICE Server..... 33 4.1.2

More information

新版 明解C++入門編

新版 明解C++入門編 511!... 43, 85!=... 42 "... 118 " "... 337 " "... 8, 290 #... 71 #... 413 #define... 128, 236, 413 #endif... 412 #ifndef... 412 #if... 412 #include... 6, 337 #undef... 413 %... 23, 27 %=... 97 &... 243,

More information

_汪_文前新ok[3.1].doc

_汪_文前新ok[3.1].doc 普 通 高 校 本 科 计 算 机 专 业 特 色 教 材 精 选 四 川 大 学 计 算 机 学 院 国 家 示 范 性 软 件 学 院 精 品 课 程 基 金 青 年 基 金 资 助 项 目 C 语 言 程 序 设 计 (C99 版 ) 陈 良 银 游 洪 跃 李 旭 伟 主 编 李 志 蜀 唐 宁 九 李 涛 主 审 清 华 大 学 出 版 社 北 京 i 内 容 简 介 本 教 材 面 向

More information

C 1

C 1 C homepage: xpzhangme 2018 5 30 C 1 C min(x, y) double C // min c # include # include double min ( double x, double y); int main ( int argc, char * argv []) { double x, y; if( argc!=

More information

目录

目录 ALTERA_CPLD... 3 11SY_03091... 3 12SY_03091...4....5 21 5 22...8 23..10 24..12 25..13..17 3 1EPM7128SLC.......17 3 2EPM7032SLC.......18 33HT46R47......19..20 41..20 42. 43..26..27 5151DEMO I/O...27 52A/D89C51...28

More information

( CIP) /. :, ( ) ISBN TP CIP ( 2005) : : : : * : : 174 ( A ) : : ( 023) : ( 023)

( CIP) /. :, ( ) ISBN TP CIP ( 2005) : : : : * : : 174 ( A ) : : ( 023) : ( 023) ( CIP) /. :, 2005. 2 ( ) ISBN 7-5624-3339-9.......... TP311. 1 CIP ( 2005) 011794 : : : : * : : 174 ( A ) :400030 : ( 023) 65102378 65105781 : ( 023) 65103686 65105565 : http: / /www. cqup. com. cn : fxk@cqup.

More information

nooog

nooog C : : : , C C,,, C, C,, C ( ), ( ) C,,, ;,, ; C,,, ;, ;, ;, ;,,,, ;,,, ; : 1 9, 2 3, 4, 5, 6 10 11, 7 8, 12 13,,,,, 2008 1 1 (1 ) 1.1 (1 ) 1.1.1 ( ) 1.1.2 ( ) 1.1.3 ( ) 1.1.4 ( ) 1.1.5 ( ) 1.2 ( ) 1.2.1

More information

BOOL EnumWindows(WNDENUMPROC lparam); lpenumfunc, LPARAM (Native Interface) PowerBuilder PowerBuilder PBNI 2

BOOL EnumWindows(WNDENUMPROC lparam); lpenumfunc, LPARAM (Native Interface) PowerBuilder PowerBuilder PBNI 2 PowerBuilder 9 PowerBuilder Native Interface(PBNI) PowerBuilder 9 PowerBuilder C++ Java PowerBuilder 9 PBNI PowerBuilder Java C++ PowerBuilder NVO / PowerBuilder C/C++ PowerBuilder 9.0 PowerBuilder Native

More information

untitled

untitled A, 3+A printf( ABCDEF ) 3+ printf( ABCDEF ) 2.1 C++ main main main) * ( ) ( ) [ ].* ->* ()[] [][] ** *& char (f)(int); ( ) (f) (f) f (int) f int char f char f(int) (f) char (*f)(int); (*f) (int) (

More information

51 C 51 isp 10 C PCB C C C C KEIL

51 C 51 isp 10   C   PCB C C C C KEIL http://wwwispdowncom 51 C " + + " 51 AT89S51 In-System-Programming ISP 10 io 244 CPLD ATMEL PIC CPLD/FPGA ARM9 ISP http://wwwispdowncom/showoneproductasp?productid=15 51 C C C C C ispdown http://wwwispdowncom

More information

C语言的应用.PDF

C语言的应用.PDF AVR C 9 1 AVR C IAR C, *.HEX, C,,! C, > 9.1 AVR C MCU,, AVR?! IAR AVR / IAR 32 ALU 1KBytes - 8MBytes (SPM ) 16 MBytes C C *var1, *var2; *var1++ = *--var2; AVR C 9 2 LD R16,-X ST Z+,R16 Auto (local

More information

<4D F736F F D20BBF9D3DA F344C696E7578B5C C9E3CFF1CDB7CDBCCFF1B2C9BCAFCAB5CFD62E646F63>

<4D F736F F D20BBF9D3DA F344C696E7578B5C C9E3CFF1CDB7CDBCCFF1B2C9BCAFCAB5CFD62E646F63> 基于 Video4Linux 的 USB 摄像头图像采集实现 Write by daily3( 戴小鼠 ) 著作权 : 戴丽 ( 合肥工业大学 ) (email:daily3@126.com) 做了一段时间的摄像头图像采集, 有了一些心得 在论坛上开的 2410 摄像头问题专贴 (http://www.hhcn.com/cgi-bin/topic.cgi?forum=1&topic=247&show=0)

More information

untitled

untitled 1 Outline 數 料 數 數 列 亂數 練 數 數 數 來 數 數 來 數 料 利 料 來 數 A-Z a-z _ () 不 數 0-9 數 不 數 SCHOOL School school 數 讀 school_name schoolname 易 不 C# my name 7_eleven B&Q new C# (1) public protected private params override

More information

概述

概述 OPC Version 1.6 build 0910 KOSRDK Knight OPC Server Rapid Development Toolkits Knight Workgroup, eehoo Technology 2002-9 OPC 1...4 2 API...5 2.1...5 2.2...5 2.2.1 KOS_Init...5 2.2.2 KOS_InitB...5 2.2.3

More information

bingdian001.com

bingdian001.com TSM12M TSM12 STM8L152C6, STM8L152R8 MSP430F5325 whym1987@126.com! /******************************************************************************* * : TSM12.c * : * : 2013/10/21 * : TSM12, STM8L f(sysclk)

More information

ICD ICD ICD ICD ICD

ICD ICD ICD ICD ICD MPLAB ICD2 MPLAB ICD2 PIC MPLAB-IDE V6.0 ICD2 usb PC RS232 MPLAB IDE PC PC 2.0 5.5V LED EEDATA MPLAB ICD2 Microchip MPLAB-IDE v6.0 Windows 95/98 Windows NT Windows 2000 www.elc-mcu.com 1 ICD2...4 1.1 ICD2...4

More information

6 C51 ANSI C Turbo C C51 Turbo C C51 C51 C51 C51 C51 C51 C51 C51 C C C51 C51 ANSI C MCS-51 C51 ANSI C C C51 bit Byte bit sbit

6 C51 ANSI C Turbo C C51 Turbo C C51 C51 C51 C51 C51 C51 C51 C51 C C C51 C51 ANSI C MCS-51 C51 ANSI C C C51 bit Byte bit sbit 6 C51 ANSI C Turbo C C51 Turbo C C51 C51 C51 C51 C51 C51 C51 C51 C51 6.1 C51 6.1.1 C51 C51 ANSI C MCS-51 C51 ANSI C C51 6.1 6.1 C51 bit Byte bit sbit 1 0 1 unsigned char 8 1 0 255 Signed char 8 11 128

More information

C PICC C++ C++ C C #include<pic.h> C static volatile unsigned char 0x01; static volatile unsigned char 0x02; static volatile unsigned cha

C PICC C++ C++ C C #include<pic.h> C static volatile unsigned char 0x01; static volatile unsigned char 0x02; static volatile unsigned cha CYPOK CYPOK 1 UltraEdit Project-->Install Language Tool: Language Suite----->hi-tech picc Tool Name ---->PICC Compiler Executable ---->c:hi-picinpicc.exe ( Command-line Project-->New Project-->File Name--->myc

More information

EK-STM32F

EK-STM32F STMEVKIT-STM32F10xx8 软 件 开 发 入 门 指 南 目 录 1 EWARM 安 装... 1 1.1 第 一 步 : 在 线 注 册... 1 1.2 第 二 步 : 下 载 软 件... 2 1.3 第 三 步 : 安 装 EWARM... 3 2 基 于 STMEVKIT-STM32F10xx8 的 示 例 代 码 运 行... 6 2.1 GPIO Demo... 6 2.2

More information

C/C++语言 - 分支结构

C/C++语言 - 分支结构 C/C++ Table of contents 1. if 2. if else 3. 4. 5. 6. continue break 7. switch 1 if if i // colddays.c: # include int main ( void ) { const int FREEZING = 0; float temperature ; int cold_ days

More information

TwinCAT 1. TwinCAT TwinCAT PLC PLC IEC TwinCAT TwinCAT Masc

TwinCAT 1. TwinCAT TwinCAT PLC PLC IEC TwinCAT TwinCAT Masc TwinCAT 2001.12.11 TwinCAT 1. TwinCAT... 3 2.... 4... 4...11 3. TwinCAT PLC... 13... 13 PLC IEC 61131-3... 14 4. TwinCAT... 17... 17 5. TwinCAT... 18... 18 6.... 19 Maschine.pro... 19... 27 7.... 31...

More information

NEXT SDT2.51 C:\ARM251 SDT2.51 ARM SDT 2.51 ARM PROJECT MANAGER SDT 2

NEXT SDT2.51 C:\ARM251 SDT2.51 ARM SDT 2.51 ARM PROJECT MANAGER SDT 2 S3C44B0 SDT DRAGNBOY MICROSTAR ARM 51 ARM S3C44B0 ARM SDT2.51 IAR ADS SDT2.51 S3C44B0 LEDTEST SDT ARM 1 2 SDT embed.8800.org SDT2.51 SDT2.51 ARM ARM CPU ARM SDT ADS ADS MULTI-ICE SDT JTAG JTAG SDT SDT2.51

More information

MGEffV1dot0ProgrammingGuide < Main < TWiki Page 2 of 版本日期

MGEffV1dot0ProgrammingGuide < Main < TWiki   Page 2 of 版本日期 MGEffV1dot0ProgrammingGuide < Main < TWiki Page 1 of 2 mgeff 编程指南 目录修订记录版本变更记录 目录 前言 版权声明 关于本指南 第一部分 mgeff 简介 第一章动画原理 第二章 mgeff 架构与特性 第二部分 mgeff 使用基础 第三章开始启程 第四章创建和运行动画 第五章动画的参数 第六章动力曲线 第七章动画的属性 第八章动画上下文信息

More information

Simulator By SunLingxi 2003

Simulator By SunLingxi 2003 Simulator By SunLingxi sunlingxi@sina.com 2003 windows 2000 Tornado ping ping 1. Tornado Full Simulator...3 2....3 3. ping...6 4. Tornado Simulator BSP...6 5. VxWorks simpc...7 6. simulator...7 7. simulator

More information

Microsoft Word - 把时间当作朋友(2011第3版)3.0.b.06.doc

Microsoft Word - 把时间当作朋友(2011第3版)3.0.b.06.doc 2 5 8 11 0 13 1. 13 2. 15 3. 18 1 23 1. 23 2. 26 3. 28 2 36 1. 36 2. 39 3. 42 4. 44 5. 49 6. 51 3 57 1. 57 2. 60 3. 64 4. 66 5. 70 6. 75 7. 83 8. 85 9. 88 10. 98 11. 103 12. 108 13. 112 4 115 1. 115 2.

More information

untitled

untitled www.mcudriver.cn 1.1 / 1) WinAVR20070525 2) Source Insight 3) ISP 4) PonyProg ISP 5) USB 6) 1.2. MCU ATMEGA16 1.3. AVR8 1.4 LED0~LED7 1 1.5 #include // Program 1.1 LED.C #define uchar unsigned

More information

2 12

2 12 SHENZHEN BRILLIANT CRYSTAL TECHNOLOGIC CO.,LTD. The specification for the following models Graphic LCM serial communication control board CB001 PROPOSED BY APPROVED Design Approved TEL:+86-755-29995238

More information

mvc

mvc Build an application Tutor : Michael Pan Application Source codes - - Frameworks Xib files - - Resources - ( ) info.plist - UIKit Framework UIApplication Event status bar, icon... delegation [UIApplication

More information

static struct file_operations gpio_ctl_fops={ ioctl: gpio_ctl_ioctl, open : gpio_open, release: gpio_release, ; #defineled1_on() (GPBDAT &= ~0x1) #def

static struct file_operations gpio_ctl_fops={ ioctl: gpio_ctl_ioctl, open : gpio_open, release: gpio_release, ; #defineled1_on() (GPBDAT &= ~0x1) #def Kaise s 2410 Board setting [1]. Device Driver Device Driver Linux s Kernel ARM s kernel s3c2410_kernel2.4.18_r1.1_change.tar.bz2 /usr/src (1) #cd /usr/src (2) #tar xfj s3c2410_kernel2.4.18_r1.1_change.tar.bz2

More information

四川省普通高等学校

四川省普通高等学校 四 川 省 普 通 高 等 学 校 计 算 机 应 用 知 识 和 能 力 等 级 考 试 考 试 大 纲 (2013 年 试 行 版 ) 四 川 省 教 育 厅 计 算 机 等 级 考 试 中 心 2013 年 1 月 目 录 一 级 考 试 大 纲 1 二 级 考 试 大 纲 6 程 序 设 计 公 共 基 础 知 识 6 BASIC 语 言 程 序 设 计 (Visual Basic) 9

More information

Microsoft Word - PHP7Ch01.docx

Microsoft Word - PHP7Ch01.docx PHP 01 1-6 PHP PHP HTML HTML PHP CSSJavaScript PHP PHP 1-6-1 PHP HTML PHP HTML 1. Notepad++ \ch01\hello.php 01: 02: 03: 04: 05: PHP 06:

More information

Microsoft Word - 正文.doc

Microsoft Word - 正文.doc 1 2 1 2 3 4 5 6 7 8 9 10 3 1 150 2 150 1 1 1.1 1.1.1 1.2 1.2.1 1.2.2 1.2.3 1.3 1.3.1 1.3.2 1.4 1.4.1 CPU 1.4.2 I/O 1.4.3 I/O 1.5 1.5.1 CISC RISC 1.5.2 1.5.3 1.6 1.6.1 1.6.2 N 1.6.3 2 2.1 2.1.1 2.1.2 2.1.3

More information

untitled

untitled http://www.embedded-soc.com/ J-LINK J-Link Rev2.1 http://www.embedded-soc.com/ 2007-11-11 http://www.embedded-soc.com/ J-LINK J-Link ARM JTAG J-LINK J-LINKJLINK J-FLASH ARM F.A.Q jlink GDBserver J-Flash

More information

Microsoft Word - CIN-DLL.doc

Microsoft Word - CIN-DLL.doc 6.3. 调 用 动 态 链 接 库 (DLL) 相 对 于 CIN 来 讲,NI 更 推 荐 用 户 使 用 DLL 来 共 享 基 于 文 本 编 程 语 言 开 发 的 代 码 除 了 共 享 或 重 复 利 用 代 码, 开 发 人 员 还 能 利 用 DLL 封 装 软 件 的 功 能 模 块, 以 便 这 些 模 块 能 被 不 同 开 发 工 具 利 用 在 LabVIEW 中 使 用

More information

Abstract arm linux tool-chain root NET-Start! 2

Abstract arm linux tool-chain root NET-Start! 2 Lab III - Embedding Linux 1 Abstract arm linux tool-chain root NET-Start! 2 Part 1.4 Step1. tool-chain 4 Step2. PATH 4 Part 2 kernel 5 Step1. 5 Step2... 6 Step3...8 Part 3 root. 8 Step1. 8 Step2. 8 Part

More information

Microsoft PowerPoint - os_4.ppt

Microsoft PowerPoint - os_4.ppt 行 程 資 科 系 林 偉 川 行 程 概 念 行 程 與 程 式 主 要 的 不 同 點 : 程 式 是 被 放 在 外 部 的 儲 存 裝 置 如 磁 碟 上, 而 行 程 則 被 放 在 記 憶 體 中 程 式 在 儲 存 裝 置 中 是 靜 態 的, 而 行 程 在 記 憶 體 中 是 動 態 的, 它 會 隨 著 一 些 事 件 的 發 生 而 產 生 相 對 的 改 變 行 程, 就 是

More information

untitled

untitled 1 5 IBM Intel 1. IBM 第 1/175 页 第 2/175 页 第 3/175 页 80 第 4/175 页 2. IBM 第 5/175 页 3. (1) 第 6/175 页 第 7/175 页 第 8/175 页 = = 第 9/175 页 = = = = = 第 10/175 页 = = = = = = = = 3. (2) 第 11/175 页 第 12/175 页 第 13/175

More information

2013 C 1 # include <stdio.h> 2 int main ( void ) 3 { 4 int cases, a, b, i; 5 scanf ("%d", & cases ); 6 for (i = 0;i < cases ;i ++) 7 { 8 scanf ("%d %d

2013 C 1 # include <stdio.h> 2 int main ( void ) 3 { 4 int cases, a, b, i; 5 scanf (%d, & cases ); 6 for (i = 0;i < cases ;i ++) 7 { 8 scanf (%d %d 2013 18 ( ) 1. C pa.c, pb.c, 2. C++ pa.cpp, pb.cpp, Compilation Error cin scanf Time Limit Exceeded 1: A 5 B 5 C 5 D 5 E 5 F 5 1 2013 C 1 # include 2 int main ( void ) 3 { 4 int cases, a, b,

More information

版权所有 (C) 2008~2010, 北京飞漫软件技术有限公司, 保留所有权利 无论您以何种方式获得该指南的全部或部分文字或图片资料, 无论是普通印刷品还是电子文档, 北京飞漫软件技术有限公司仅仅授权您阅读的权利, 任何形式的格式转换 再次发布 传播以及复制其内容的全部或部分, 或将其中的文字和图

版权所有 (C) 2008~2010, 北京飞漫软件技术有限公司, 保留所有权利 无论您以何种方式获得该指南的全部或部分文字或图片资料, 无论是普通印刷品还是电子文档, 北京飞漫软件技术有限公司仅仅授权您阅读的权利, 任何形式的格式转换 再次发布 传播以及复制其内容的全部或部分, 或将其中的文字和图 ministudio 用户手册 版本 1.0 修订号 0 适用于 ministudio Ver 1.0.x 北京飞漫软件技术有限公司 2010 年 5 月 版权所有 (C) 2008~2010, 北京飞漫软件技术有限公司, 保留所有权利 无论您以何种方式获得该指南的全部或部分文字或图片资料, 无论是普通印刷品还是电子文档, 北京飞漫软件技术有限公司仅仅授权您阅读的权利, 任何形式的格式转换 再次发布

More information

untitled

untitled 1 DBF (READDBF.C)... 1 2 (filetest.c)...2 3 (mousetes.c)...3 4 (painttes.c)...5 5 (dirtest.c)...9 6 (list.c)...9 1 dbf (readdbf.c) /* dbf */ #include int rf,k,reclen,addr,*p1; long brec,erec,i,j,recnum,*p2;

More information

ebook15-10

ebook15-10 1 0 10.1 U N I X V 7 4. 3 B S D S V R 3 P O S I X. 1 100 % 10.2 S I G S I G A B RT a b o r t S I G A L R M a l a r m V 7 1 5 S V R 4 4. 3 + B S D 31 < s i g n a l. h > 0 10. 9 k i l l 0 P O S I X. 1 D

More information

学习MSP430单片机推荐参考书

学习MSP430单片机推荐参考书 MSP430 16 MSP430 C MSP430 C MSP430 FLASH 16 1 CPU 16 ALU 16 PC SP SR R4~R15 2 3 00-FFH 100-1FFH 4 5 1 2 51 24 27 6 1 2 3 4 5 6 4 12 SR SP SR CPU SR CPU C Z N GIE CPUOff CPU OscOff SCG0 SCG1 CPU EXIT SP

More information

CC213

CC213 : (Ken-Yi Lee), E-mail: feis.tw@gmail.com 9 [P.11] : Dev C++ [P.12] : http://c.feis.tw [P.13] [P.14] [P.15] [P.17] [P.23] Dev C++ [P.24] [P.27] [P.34] C / C++ [P.35] 10 C / C++ C C++ C C++ C++ C ( ) C++

More information

ebook 86-15

ebook 86-15 15 G t k + d e l e t e _ e v e n t G n o m e G n o m e 15.1 GnomeDialog G t k + G n o m e D i a l o g 15.1.1 G n o m e D i a l o g g n o m e _ d i a l o g _ n e w ( ) G N O M E _ D I A L O G ( d i a l

More information

Microsoft Word - 实用案例.doc

Microsoft Word - 实用案例.doc 计 算 机 系 统 应 用 2009 年 第 12 期 嵌 入 式 Linux 下 温 湿 度 传 感 器 的 设 计 与 实 现 1 Design and Implementation of Temperature and Humidity Sensor Based on Embedded Linux 陈 博 刘 锦 高 ( 华 东 师 范 大 学 电 子 科 学 技 术 系 上 海 200241)

More information

untitled

untitled 3 C++ 3.1 3.2 3.3 3.4 new delete 3.5 this 3.6 3.7 3.1 3.1 class struct union struct union C class C++ C++ 3.1 3.1 #include struct STRING { typedef char *CHARPTR; // CHARPTR s; // int strlen(

More information

untitled

untitled MODBUS 1 MODBUS...1 1...4 1.1...4 1.2...4 1.3...4 1.4... 2...5 2.1...5 2.2...5 3...6 3.1 OPENSERIAL...6 3.2 CLOSESERIAL...8 3.3 RDMULTIBIT...8 3.4 RDMULTIWORD...9 3.5 WRTONEBIT...11 3.6 WRTONEWORD...12

More information

uc/os 1

uc/os 1 uc/os 1 uc/os-ii Source Code ANSI C, uc/os-ii 8/16/32 bits microprocessor Preemptive real-time Task 64 Stack Size ROMable (C compiler, assembler and linker/locator) uc/os-ii Mailboxes, Queues, Semaphores,

More information

Microsoft Word - 11.doc

Microsoft Word - 11.doc 除 錯 技 巧 您 將 於 本 章 學 到 以 下 各 項 : 如 何 在 Visual C++ 2010 的 除 錯 工 具 控 制 下 執 行 程 式? 如 何 逐 步 地 執 行 程 式 的 敘 述? 如 何 監 看 或 改 變 程 式 中 的 變 數 值? 如 何 監 看 程 式 中 計 算 式 的 值? 何 謂 Call Stack? 何 謂 診 斷 器 (assertion)? 如 何

More information

錄...1 說...2 說 說...5 六 率 POST PAY PREPAY DEPOSIT 更

錄...1 說...2 說 說...5 六 率 POST PAY PREPAY DEPOSIT 更 AX5000 Version 1.0 2006 年 9 錄...1 說...2 說...3...4 說...5 六...6 6.1 率...7 6.2 POST PAY...8 6.3 PREPAY DEPOSIT...9 6.4...10 6.5...11 更...12...12 LCD IC LED Flash 更 兩 RJ11 ( ) DC ON OFF ON 狀 狀 更 OFF 復 狀 說

More information

INTRODUCTION TO COM.DOC

INTRODUCTION TO COM.DOC How About COM & ActiveX Control With Visual C++ 6.0 Author: Curtis CHOU mahler@ms16.hinet.net This document can be freely release and distribute without modify. ACTIVEX CONTROLS... 3 ACTIVEX... 3 MFC ACTIVEX

More information

<4D6963726F736F667420576F7264202D20C8EDC9E82DCFC2CEE7CCE22D3039C9CF>

<4D6963726F736F667420576F7264202D20C8EDC9E82DCFC2CEE7CCE22D3039C9CF> 全 国 计 算 机 技 术 与 软 件 专 业 技 术 资 格 ( 水 平 考 试 2009 年 上 半 年 软 件 设 计 师 下 午 试 卷 ( 考 试 时 间 14:00~16:30 共 150 分 钟 请 按 下 述 要 求 正 确 填 写 答 题 纸 1. 在 答 题 纸 的 指 定 位 置 填 写 你 所 在 的 省 自 治 区 直 辖 市 计 划 单 列 市 的 名 称 2. 在 答

More information

epub 33-8

epub 33-8 8 1) 2) 3) A S C I I 4 C I / O I / 8.1 8.1.1 1. ANSI C F I L E s t d i o. h typedef struct i n t _ f d ; i n t _ c l e f t ; i n t _ m o d e ; c h a r *_ n e x t ; char *_buff; /* /* /* /* /* 1 5 4 C FILE

More information

Microsoft Word - 01.DOC

Microsoft Word - 01.DOC 第 1 章 JavaScript 简 介 JavaScript 是 NetScape 公 司 为 Navigator 浏 览 器 开 发 的, 是 写 在 HTML 文 件 中 的 一 种 脚 本 语 言, 能 实 现 网 页 内 容 的 交 互 显 示 当 用 户 在 客 户 端 显 示 该 网 页 时, 浏 览 器 就 会 执 行 JavaScript 程 序, 用 户 通 过 交 互 式 的

More information

epub83-1

epub83-1 C++Builder 1 C + + B u i l d e r C + + B u i l d e r C + + B u i l d e r C + + B u i l d e r 1.1 1.1.1 1-1 1. 1-1 1 2. 1-1 2 A c c e s s P a r a d o x Visual FoxPro 3. / C / S 2 C + + B u i l d e r / C

More information

Microsoft PowerPoint - ds-1.ppt [兼容模式]

Microsoft PowerPoint - ds-1.ppt [兼容模式] http://jwc..edu.cn/jxgl/ HomePage/Default.asp 2 说 明 总 学 时 : 72( 学 时 )= 56( 课 时 )+ 16( 实 验 ) 行 课 时 间 : 第 1 ~14 周 周 学 时 : 平 均 每 周 4 学 时 上 机 安 排 待 定 考 试 时 间 : 课 程 束 第 8 11 12 章 的 内 容 为 自 学 内 容 ; 目 录 中 标 有

More information

言1.PDF

言1.PDF MSP430 WINDOWS WORKBENCH MSP430 Flash Green MCU Flash Flash MCU MSP430 16 RISC 27 125ns 1.8V~3.6V A/D 6 s MSP430 10 ESD MSP430 MSP430 10 MSP430 2001 MSP430 Windows Workbench Interface Guide Windows Workbench

More information

C/C++语言 - C/C++数据

C/C++语言 - C/C++数据 C/C++ C/C++ Table of contents 1. 2. 3. 4. char 5. 1 C = 5 (F 32). 9 F C 2 1 // fal2cel. c: Convert Fah temperature to Cel temperature 2 # include < stdio.h> 3 int main ( void ) 4 { 5 float fah, cel ;

More information

表3:

表3: 1. 面 向 对 象 程 序 设 计 课 程 教 学 大 纲 2. 面 向 对 象 程 序 设 计 实 验 教 学 大 纲 3. 离 散 数 学 课 程 教 学 大 纲 4. 数 据 结 构 课 程 教 学 大 纲 5. 数 据 结 构 实 验 教 学 大 纲 6. 计 算 机 组 成 原 理 课 程 教 学 大 纲 7. 操 作 系 统 课 程 教 学 大 纲 8. 操 作 系 统 实 验 教 学

More information

全国计算机技术与软件专业技术资格(水平)考试

全国计算机技术与软件专业技术资格(水平)考试 全 国 计 算 机 技 术 与 软 件 专 业 技 术 资 格 ( 水 平 ) 考 试 2008 年 上 半 年 程 序 员 下 午 试 卷 ( 考 试 时 间 14:00~16:30 共 150 分 钟 ) 试 题 一 ( 共 15 分 ) 阅 读 以 下 说 明 和 流 程 图, 填 补 流 程 图 中 的 空 缺 (1)~(9), 将 解 答 填 入 答 题 纸 的 对 应 栏 内 [ 说 明

More information

(Load Project) (Save Project) (OffLine Mode) (Help) Intel Hex Motor

(Load Project) (Save Project) (OffLine Mode) (Help) Intel Hex Motor 1 4.1.1.1 (Load) 14 1.1 1 4.1.1.2 (Save) 14 1.1.1 1 4.1.2 (Buffer) 16 1.1.2 1 4.1.3 (Device) 16 1.1.3 1 4.1.3.1 (Select Device) 16 2 4.1.3.2 (Device Info) 16 2.1 2 4.1.3.3 (Adapter) 17 2.1.1 CD-ROM 2 4.1.4

More information

Microsoft Word - InoTouch Editor编程软件手册2012.2.10.doc

Microsoft Word - InoTouch Editor编程软件手册2012.2.10.doc 目 录 第 一 章 关 于 InoTouch Editor 编 程 软 件 的 安 装... - 6-1.1 InoTouch 系 列 HMI 和 InoTouch Editor 软 件 的 简 介... - 6-1.2 安 装 InoTouch Editor 编 程 软 件... - 10-1.3 系 统 连 接 图... - 12-1.4 InoTouch 系 列 人 机 界 面 的 系 统 设

More information

, 7, Windows,,,, : ,,,, ;,, ( CIP) /,,. : ;, ( 21 ) ISBN : -. TP CIP ( 2005) 1

, 7, Windows,,,, : ,,,, ;,, ( CIP) /,,. : ;, ( 21 ) ISBN : -. TP CIP ( 2005) 1 21 , 7, Windows,,,, : 010-62782989 13501256678 13801310933,,,, ;,, ( CIP) /,,. : ;, 2005. 11 ( 21 ) ISBN 7-81082 - 634-4... - : -. TP316-44 CIP ( 2005) 123583 : : : : 100084 : 010-62776969 : 100044 : 010-51686414

More information

[改訂新版]C言語による標準アルゴリズム事典

[改訂新版]C言語による標準アルゴリズム事典 iii C 1991 SEND + MORE = MONEY C 100 2003 Java 2003 27 PC-9800 C BMP SVG EPS BMPSVG WindowsMacLinux Web iv int main() int main(void) EXIT_SUCCESS 0 https://github.com/okumuralab/ algo-c TEX TEX PDF PDF

More information

untitled

untitled 不 料 料 例 : ( 料 ) 串 度 8 年 數 串 度 4 串 度 數 數 9- ( ) 利 數 struct { ; ; 數 struct 數 ; 9-2 數 利 數 C struct 數 ; C++ 數 ; struct 省略 9-3 例 ( 料 例 ) struct people{ char name[]; int age; char address[4]; char phone[]; int

More information

CC213

CC213 : (Ken-Yi Lee), E-mail: feis.tw@gmail.com 177 [P179] (1) - [P181] [P182] (2) - for [P183] (3) - switch [P184] [P187] [P189] [P194] 178 [ ]; : : int var; : int var[3]; var 2293620 var[0] var[1] 2293620

More information

d2.doc

d2.doc 2 Windows Windows Windows Windows Windows Windows Windows Windows Windows Windows DOS Windows Windows Windows 1.0 Microsoft 2 Windows Windows 1.0 DOS Windows 1.0 80286 8086 Microsoft Windows 2.0 Windows

More information

展讯平台软件架构介绍 [只读]

展讯平台软件架构介绍 [只读] (SAP) Software Application Platform Call SMS CBS SS PB Game. E-Mail Java App MMS/WEB ATC Multimedia Applications Audio/Video/Test PTT H.324/M MMI J2ME WAP SIP RTP/RTCP SOFTWARE APPLICATION PLATFORM MMI

More information

ebook

ebook 3 3 3.1 3.1.1 ( ) 90 3 1966 B e r n s t e i n P ( i ) R ( i ) W ( i P ( i P ( j ) 1) R( i) W( j)=φ 2) W( i) R( j)=φ 3) W( i) W( j)=φ 3.1.2 ( p r o c e s s ) 91 Wi n d o w s Process Control Bl o c k P C

More information

目 录

目 录 1 Quick51...1 1.1 SmartSOPC Quick51...1 1.2 Quick51...1 1.3 Quick51...2 2 Keil C51 Quick51...4 2.1 Keil C51...4 2.2 Keil C51...4 2.3 1 Keil C51...4 2.4 Flash Magic...9 2.5 ISP...9 2.6...10 2.7 Keil C51...12

More information

untitled

untitled 2006 6 Geoframe Geoframe 4.0.3 Geoframe 1.2 1 Project Manager Project Management Create a new project Create a new project ( ) OK storage setting OK (Create charisma project extension) NO OK 2 Edit project

More information

IP505SM_manual_cn.doc

IP505SM_manual_cn.doc IP505SM 1 Introduction 1...4...4...4...5 LAN...5...5...6...6...7 LED...7...7 2...9...9...9 3...11...11...12...12...12...14...18 LAN...19 DHCP...20...21 4 PC...22...22 Windows...22 TCP/IP -...22 TCP/IP

More information

典型自编教材

典型自编教材 河 南 科 技 大 学 计 算 机 实 验 教 学 中 心 1. 计 算 机 文 化 基 础 实 验 指 导 书 2. 数 据 结 构 实 验 指 导 书 3. 操 作 系 统 实 验 指 导 书 4. 面 向 对 象 程 序 设 计 实 验 指 导 书 5. 数 据 库 原 理 实 验 指 导 书 6. 编 译 原 理 实 验 指 导 书 7. JAVA 程 序 设 计 实 验 指 导 书 8.

More information

ebook39-5

ebook39-5 5 3 last-in-first-out, LIFO 3-1 L i n e a r L i s t 3-8 C h a i n 3 3. 8. 3 C + + 5.1 [ ] s t a c k t o p b o t t o m 5-1a 5-1a E D 5-1b 5-1b E E 5-1a 5-1b 5-1c E t o p D t o p D C C B B B t o p A b o

More information

How to Debug Tuxedo Server printf( Input data is: %s, inputstr); fprintf(stdout, Input data is %s, inputstr); fprintf(stderr, Input data is %s, inputstr); printf( Return data is: %s, outputstr); tpreturn(tpsuccess,

More information

+00DE _01EN.book

+00DE _01EN.book TCS-NET MODBUS TCS-NET Modbus TCB-IFMB640TLE 1...... 2 2 RS 485... 3 3... 3 4... 4 5... 4 6... 5 7... 6 8... 16 TCS-NET Modbus 1 http://www.modbus-ida.org/ >=3.5 8 8 N*8 ( N = 252.) 16 >= 3.5 Modbus-Master

More information

1

1 SDT Uclinux SDT.alf.c 44blib.alf 44blib.c jtag ADS.alf.c make menuconfig make dep make clean make lib_only make user_only make romfs make image make uclinux ext2 cash lcd frambuffer 1 armsys-c uclinux

More information

els0xu_zh_nf_v8.book Page Wednesday, June, 009 9:5 AM ELS-0/0C.8

els0xu_zh_nf_v8.book Page Wednesday, June, 009 9:5 AM ELS-0/0C.8 els0xu_zh_nf_v8.book Page Wednesday, June, 009 9:5 AM ELS-0/0C.8 Yamaha ELS-0/0C..8 LCD ELS-0/0C v. typeu LCD ELS-0/0C typeu / -6 / [SEARCH] / - ZH ELS-0/0C.8 els0xu_zh_nf_v8.book Page Wednesday, June,

More information

提纲 1 2 OS Examples for 3

提纲 1 2 OS Examples for 3 第 4 章 Threads2( 线程 2) 中国科学技术大学计算机学院 October 28, 2009 提纲 1 2 OS Examples for 3 Outline 1 2 OS Examples for 3 Windows XP Threads I An Windows XP application runs as a seperate process, and each process may

More information

ebook35-21

ebook35-21 21 Linux L i n u x 211 U N I X U N I X I / O F I F O U N I X I n t e r n e t s o c k e t () s o c k e t () send() r e c v ( read() w r i t e () send() r e c v () I n t e r n e t 212 Internet Internet S

More information

C/C++ 语言 - 循环

C/C++ 语言 - 循环 C/C++ Table of contents 7. 1. 2. while 3. 4. 5. for 6. 8. (do while) 9. 10. (nested loop) 11. 12. 13. 1 // summing.c: # include int main ( void ) { long num ; long sum = 0L; int status ; printf

More information

科 技 与 法 律 Science Technology and Law Vol.89, No.1, 2011 作 品 若 将 打 字 机 也 算 作 字 体 工 具, 那 么 打 字 机 不 是 美 术 作 品, 只 是 一 种 工 业 产 品 字 帖 是 美 术 作 品 么? 笔 者 认 为,

科 技 与 法 律 Science Technology and Law Vol.89, No.1, 2011 作 品 若 将 打 字 机 也 算 作 字 体 工 具, 那 么 打 字 机 不 是 美 术 作 品, 只 是 一 种 工 业 产 品 字 帖 是 美 术 作 品 么? 笔 者 认 为, 专题研究 计算机字体版权保护 张玉瑞 论计算机字体的版权保护 论计算机字体的版权保护 张玉瑞 中国社会科学院法学研究所 北京 100720 摘 要 对计算机字体产生之单字寻求版权保护 是近来知识产权法律中的热点和难点问题 从字体保护的 国际公约 外国法律及其司法实践看 字体工具属于计算机软件产品 其产生的单字没有版权 社会无关第 三人的使用不构成侵犯书法作品版权 计算机字库是字体工具 不是美术作品

More information

Windows XP

Windows XP Windows XP What is Windows XP Windows is an Operating System An Operating System is the program that controls the hardware of your computer, and gives you an interface that allows you and other programs

More information

chp6.ppt

chp6.ppt Java 软 件 设 计 基 础 6. 异 常 处 理 编 程 时 会 遇 到 如 下 三 种 错 误 : 语 法 错 误 (syntax error) 没 有 遵 循 语 言 的 规 则, 出 现 语 法 格 式 上 的 错 误, 可 被 编 译 器 发 现 并 易 于 纠 正 ; 逻 辑 错 误 (logic error) 即 我 们 常 说 的 bug, 意 指 编 写 的 代 码 在 执 行

More information

提问袁小兵:

提问袁小兵: C++ 面 试 试 题 汇 总 柯 贤 富 管 理 软 件 需 求 分 析 篇 1. STL 类 模 板 标 准 库 中 容 器 和 算 法 这 部 分 一 般 称 为 标 准 模 板 库 2. 为 什 么 定 义 虚 的 析 构 函 数? 避 免 内 存 问 题, 当 你 可 能 通 过 基 类 指 针 删 除 派 生 类 对 象 时 必 须 保 证 基 类 析 构 函 数 为 虚 函 数 3.

More information

AL-M200 Series

AL-M200 Series NPD4754-00 TC ( ) Windows 7 1. [Start ( )] [Control Panel ()] [Network and Internet ( )] 2. [Network and Sharing Center ( )] 3. [Change adapter settings ( )] 4. 3 Windows XP 1. [Start ( )] [Control Panel

More information

一个开放源码的嵌入式仿真环境 ― SkyEye

一个开放源码的嵌入式仿真环境 ― SkyEye SkyEye SkyEye http://hpclab.cs.tsinghua.edu.cn/~skyeye/ I hear and I forget, I see and I remember, I do and I understand. SkyEye SkyEye SkyEye SkyEye SkyEye 1. SkyEye PC pervasive computing PC I O PDA

More information

引言

引言 BELL 18% 15% 50% 20% BELL 10% 2. 2.1. < 1> 4 TAB < 2> > (1) printf("%d %d %d", a, b, c); (2), "=" "+=" "+" "%" "&&" "&" "

More information

上海市教育考试院关于印发新修订的

上海市教育考试院关于印发新修订的 沪 教 考 院 社 考 2012 7 号 上 海 市 教 育 考 试 院 关 于 印 发 上 海 市 高 等 学 校 计 算 机 等 级 考 试 大 纲 (2012 年 修 订 ) 的 通 知 各 有 关 高 校 : 为 进 一 步 加 强 本 市 高 校 计 算 机 基 础 教 学 工 作, 推 进 学 校 更 加 科 学 合 理 地 设 置 计 算 机 基 础 课 程 及 安 排 教 学 内 容,

More information

untitled

untitled 1 1.1 1.2 1.3 1.4 1.5 ++ 1.6 ++ 2 BNF 3 4 5 6 7 8 1.2 9 1.2 IF ELSE 10 1.2 11 1.2 12 1.3 Ada, Modula-2 Simula Smalltalk-80 C++, Objected Pascal(Delphi), Java, C#, VB.NET C++: C OOPL Java: C++ OOPL C# C++

More information

<4D F736F F D D342DA57CA7DEA447B14D2DA475B57BBB50BADEB27AC3FEB14DA447B8D5C344>

<4D F736F F D D342DA57CA7DEA447B14D2DA475B57BBB50BADEB27AC3FEB14DA447B8D5C344> 1. 請 問 誰 提 出 積 體 電 路 (IC) 上 可 容 納 的 電 晶 體 數 目, 約 每 隔 24 個 月 (1975 年 更 改 為 18 個 月 ) 便 會 增 加 一 倍, 效 能 也 將 提 升 一 倍, 也 揭 示 了 資 訊 科 技 進 步 的 速 度? (A) 英 特 爾 (Intel) 公 司 創 始 人 戈 登. 摩 爾 (Gordon Moore) (B) 微 軟 (Microsoft)

More information