SAMV71 Xplained Ultra Software Package 1.4

main.c

Go to the documentation of this file.
00001 /* ----------------------------------------------------------------------------
00002  *         SAM Software Package License
00003  * ----------------------------------------------------------------------------
00004  * Copyright (c) 2014, Atmel Corporation
00005  *
00006  * All rights reserved.
00007  *
00008  * Redistribution and use in source and binary forms, with or without
00009  * modification, are permitted provided that the following conditions are met:
00010  *
00011  * - Redistributions of source code must retain the above copyright notice,
00012  * this list of conditions and the disclaimer below.
00013  *
00014  * Atmel's name may not be used to endorse or promote products derived from
00015  * this software without specific prior written permission.
00016  *
00017  * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
00018  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
00019  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
00020  * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
00021  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
00022  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
00023  * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
00024  * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
00025  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
00026  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00027  * ----------------------------------------------------------------------------
00028  */
00029 
00030 /**
00031  *  \page lcd_ebi LCD example in SMC(EBI) mode 
00032  *
00033  *  \section Purpose
00034  *
00035  *  This example demonstrates how to configure the LCD with EBI interface
00036  *
00037  *  \section Requirements
00038  *
00039  *  This package can be used with SAM V71 Xplained Ultra board with maXtouch 
00040  *  xplained LCD board. LCD board must be set to 16-bit MCU configuration with 
00041  *  the help of switch behind LCD. It should be in IM0 and IM2 should be in Off 
00042  *  position and IM1 should be in On. 
00043  *
00044  *  \section Description
00045  *
00046  *  \section Usage
00047  *
00048  *  -# Build the program and download it inside the SAM V71 Xplained Ultra board. 
00049  * Please refer to the Getting Started with SAM V71 Microcontrollers.pdf
00050  *  -# On the computer, open and configure a terminal application
00051  *     (e.g. HyperTerminal on Microsoft Windows) with these settings:
00052  *    - 115200 baud rate
00053  *    - 8 bits of data
00054  *    - No parity
00055  *    - 1 stop bit
00056  *    - No flow control
00057  *  -# Start the application.
00058  *  -# In the terminal window, the
00059  *     following text should appear (values depend on the board and chip used):
00060  *     \code
00061  *      -- LCD Example xxx --
00062  *      -- xxxxxx-xx
00063  *      -- Compiled: xxx xx xxxx xx:xx:xx --
00064  *     \endcode
00065  *
00066  *  \section References
00067  *  - lcd/main.c
00068  *  - trace.h
00069  */
00070 
00071 /** \file
00072  *
00073  *  This file contains all the specific code for the xplained LCD example.
00074  *
00075  */
00076 
00077 
00078 /*----------------------------------------------------------------------------
00079  *        Headers
00080  *----------------------------------------------------------------------------*/
00081 
00082 #include "board.h"
00083 #include "image.h"
00084 #include <stdbool.h>
00085 #include <stdio.h>
00086 #include <stdlib.h>
00087 #include <string.h>
00088 
00089 
00090 /*----------------------------------------------------------------------------
00091  *        Definition
00092  *----------------------------------------------------------------------------*/
00093 //#define USE_SDRAM
00094 #define COLOR_CONVERT       RGB_24_TO_RGB565
00095 #define LCD_MODE            ILI9488_EBIMODE
00096  
00097 /*----------------------------------------------------------------------------
00098  *        Local variables
00099  *----------------------------------------------------------------------------*/
00100 /** Global DMA driver for all transfer */
00101 static sXdmad lcdEbiDma;
00102 
00103 /** Image buffer (16-bits color). */
00104 const uint32_t gImageBuffer[DEMO_IMAGE_HEIGHT * DEMO_IMAGE_WIDTH] = DEMO_IMAGE;
00105 rect canvas_region[4];
00106 static rect lcd_rc;
00107 
00108 #if defined USE_SDRAM
00109 #pragma location = "sdram_region"
00110 #endif
00111 static uint16_t cavas_region_buf[BOARD_LCD_WIDTH*BOARD_LCD_HEIGHT/4];
00112 static TimeEvent RegionTimeEvent[4];
00113 
00114 static uint8_t sin_xy[236] =
00115 {
00116     78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 107,
00117     109, 111, 113, 115, 116, 118, 120, 121, 123, 125, 126, 128, 129, 130, 132, 133,
00118     135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 147, 148, 149,
00119     149, 150, 150, 151, 151, 151, 152, 152, 152, 152, 152, 152, 152, 152, 152, 151,
00120     151, 151, 150, 150, 149, 149, 148, 147, 147, 146, 145, 144, 143, 142, 141, 140,
00121     139, 138, 137, 136, 135, 133, 132, 130, 129, 128, 126, 125, 123, 121, 120, 118,
00122     116, 115, 113, 111, 109, 107, 106, 104, 102, 100, 98 , 96 , 94 , 92 , 90 , 88 ,
00123     86 , 84 , 82 , 80 , 78 , 76 , 74 , 72 , 70 , 68 , 66 , 64 , 62 , 60 , 58 , 56 ,
00124     54 , 52 , 50 , 48 , 46 , 45 , 43 , 41 , 39 , 37 , 36 , 34 , 32 , 31 , 29 , 27 ,
00125     26 , 24 , 23 , 22 , 20 , 19 , 17 , 16 , 15 , 14 , 13 , 12 , 11 , 10 , 9  , 8  ,
00126     7  , 6  , 5  , 5  , 4  , 3  , 3  , 2  , 2  , 1  , 1  , 1  , 0  , 0  , 0  , 0  ,
00127     0  , 0  , 0  , 0  , 0  , 1  , 1  , 1  , 2  , 2  , 3  , 3  , 4  , 5  , 5  , 6  ,
00128     7  , 8  , 9  , 10 , 11 , 12 , 13 , 14 , 15 , 16 , 17 , 19 , 20 , 22 , 23 , 24 ,
00129     26 , 27 , 29 , 31 , 32 , 34 , 36 , 37 , 39 , 41 , 43 , 45 , 46 , 48 , 50 , 52 ,
00130     54 , 56 , 58 , 60 , 62 , 64 , 66 , 68 , 70 , 72 , 74 , 76
00131 };
00132 
00133 uint32_t  gColorArray[] =
00134 {
00135     0x000000, 0xFFFFFF, 0x0000FF, 0xFF0000,
00136     0x000080, 0x00008B, 0x006400, 0x008B8B,
00137     0x00FFFF, 0x40E0D0, 0x4B0082, 0x800000,
00138     0x808000, 0x808080, 0x87CEEB, 0x8A2BE2,
00139     0x90EE90, 0x9400D3, 0x9ACD32, 0xA52A2A,
00140     0xA9A9A9, 0xA0522D, 0xADD8E6, 0xADFF2F,
00141     0xC0C0C0, 0xD3D3D3, 0xE0FFFF, 0xEE82EE,
00142     0xF0FFFF, 0xF5F5DC, 0xFF00FF, 0xFF6347,
00143 };
00144 
00145 
00146 /**
00147  * ISR for XDMA interrupt
00148  */
00149 void XDMAC_Handler(void)
00150 {
00151     XDMAD_Handler(&lcdEbiDma);
00152 }
00153 
00154 /**
00155  * canvas region initialization. 
00156  */
00157 static void init_canvas_region(void)
00158 {
00159     uint32_t w,h;
00160     w = 480; h = 320;
00161 
00162     canvas_region[0].x = 0;
00163     canvas_region[0].y = 0;
00164     canvas_region[0].width = w/2-1;
00165     canvas_region[0].height = h/2-1;
00166 
00167     canvas_region[1].x = w/2;
00168     canvas_region[1].y = 0;
00169     canvas_region[1].width = w/2-1;
00170     canvas_region[1].height = h/2-1;
00171 
00172     canvas_region[2].x = 0;
00173     canvas_region[2].y = h/2;
00174     canvas_region[2].width = w/2-1;
00175     canvas_region[2].height = h/2-1;
00176 
00177     canvas_region[3].x = w/2;
00178     canvas_region[3].y = h/2;
00179     canvas_region[3].width = w/2-1;
00180     canvas_region[3].height = h/2-1;
00181 
00182     lcd_rc.x = 0;
00183     lcd_rc.y = 0;
00184     lcd_rc.width = w-1;
00185     lcd_rc.height = h-1;
00186 
00187 }
00188 
00189 /**
00190  * Draw coordinate axis with with giving buffer.
00191  */
00192 static void draw_coordinate_axis(uint16_t* pCanvasBuffer,
00193                                 uint32_t x,
00194                                 uint32_t y,
00195                                 uint32_t ex,
00196                                 uint32_t ey,
00197                                 uint32_t pixel_width,
00198                                 uint32_t color)
00199 {
00200     LCDD_DrawLine(pCanvasBuffer, x, y, ex, y + pixel_width - 1, color) ;
00201     LCDD_DrawLine(pCanvasBuffer, x, y, x + pixel_width - 1 , ey, color) ;
00202     LCDD_DrawLine(pCanvasBuffer, ex - 12, y - 4 ,ex, y ,  color) ;
00203     LCDD_DrawLine(pCanvasBuffer, ex - 12, y + 4 ,ex, y ,  color) ;
00204     LCDD_DrawLine(pCanvasBuffer, x - 4,  ey + 12 ,x, ey , color) ;
00205     LCDD_DrawLine(pCanvasBuffer, x + 4,  ey + 12 ,x, ey , color) ;
00206 }
00207 
00208 /**
00209  * Draw sin wave with with giving buffer.
00210  */
00211 static void draw_sin_wave(uint16_t* pCanvasBuffer,
00212                         uint32_t offset_x,
00213                         uint32_t offset_y,
00214                         uint32_t color)
00215 {
00216     uint32_t i = 0;
00217     for(i = 0; i < sizeof(sin_xy); i++) {
00218         LCDD_DrawPixel(pCanvasBuffer,i + offset_x, offset_y - sin_xy[i], color );
00219     }
00220 }
00221 
00222 /**
00223  * Draw histogram.
00224  */
00225 static void draw_random_histogram(uint32_t height, uint32_t color)
00226 {
00227     uint8_t rand_val[32];
00228     uint32_t i;
00229     uint32_t offset_x = 24;
00230     uint32_t offset_y = height - 4;
00231     uint32_t w = 6;
00232 
00233     uint32_t * p_val = (uint32_t*)rand_val;
00234     for(i = 0; i < 8; i++) {
00235         TRNG->TRNG_CR = TRNG_CR_KEY_PASSWD | TRNG_CR_ENABLE;
00236         while(!(TRNG->TRNG_ISR & TRNG_ISR_DATRDY));
00237         p_val[i] = TRNG->TRNG_ODATA;
00238     }
00239     for(i = 0; i< 32; i++) {
00240         rand_val[i] = offset_y - rand_val[i] * offset_y / 255;
00241     }
00242     for(i =0; i< 32; i++) {
00243         LCDD_DrawRectangleWithFill(cavas_region_buf,
00244                                 offset_x+i*w,rand_val[i] , 
00245                                 6,
00246                                 offset_y-rand_val[i], 
00247                                 color);
00248     }
00249 }
00250 
00251 /**
00252  * Update canvas region 1.
00253  */
00254 static void update_region1(uint32_t pos)
00255 {
00256     LCDD_SetUpdateWindowSize(canvas_region[0]);
00257     LCDD_DrawRectangleWithFill(cavas_region_buf,canvas_region[0].x, 
00258                             canvas_region[0].y, 
00259                             canvas_region[0].width,canvas_region[0].height, 
00260                             COLOR_CONVERT(COLOR_BLUE));
00261     draw_coordinate_axis(cavas_region_buf,
00262                         4,
00263                         canvas_region[0].height - 3,
00264                         canvas_region[0].width,
00265                         0,
00266                         1,
00267                         COLOR_CONVERT(COLOR_WHITE));
00268                     
00269     draw_sin_wave(cavas_region_buf,
00270                 4,
00271                 155,
00272                 COLOR_CONVERT(COLOR_WHITE));
00273             
00274     LCDD_DrawRectangleWithFill(cavas_region_buf,
00275                             4 + pos - 2, 
00276                             155 - sin_xy[pos] - 2, 
00277                             3,
00278                             3, 
00279                             COLOR_CONVERT(COLOR_YELLOW));
00280     LCDD_UpdatePartialWindow((uint8_t*)cavas_region_buf,sizeof(cavas_region_buf));
00281 }
00282 
00283 /**
00284  * Update canvas region 2.
00285  */
00286 static void update_region2(uint32_t x,uint32_t y,uint32_t color)
00287 {
00288     LCDD_SetUpdateWindowSize(canvas_region[1]);
00289     LCDD_DrawRectangleWithFill(cavas_region_buf,
00290                             0, 
00291                             0, 
00292                             canvas_region[1].width,
00293                             canvas_region[1].height, 
00294                             COLOR_CONVERT(COLOR_GREEN));
00295     LCD_DrawString(cavas_region_buf,x, y, "SAMV71",  COLOR_CONVERT(color));
00296     LCDD_UpdatePartialWindow((uint8_t*)cavas_region_buf,sizeof(cavas_region_buf));
00297 }
00298 
00299 
00300 /**
00301  * Update canvas region 3.
00302  */
00303 static void update_region3(uint32_t alpha)
00304 {
00305     uint32_t i,j;
00306     LCDD_SetUpdateWindowSize(canvas_region[2]);
00307     LCDD_DrawRectangleWithFill(cavas_region_buf,
00308                             0, 
00309                             0, 
00310                             canvas_region[2].width,
00311                             canvas_region[2].height, 
00312                             COLOR_CONVERT(COLOR_MAGENTA));
00313                         
00314     i = ((canvas_region[2].width + 1) - DEMO_IMAGE_WIDTH) / 2;
00315     j = ((canvas_region[2].height + 1) - DEMO_IMAGE_HEIGHT) / 2;
00316     LCDD_BitBltAlphaBlend(cavas_region_buf,
00317                         i,
00318                         j,
00319                         canvas_region[2].width + 1,
00320                         canvas_region[2].height + 1,
00321                         (LcdColor_t *)gImageBuffer,
00322                         0,
00323                         0,
00324                         DEMO_IMAGE_WIDTH,DEMO_IMAGE_HEIGHT,alpha);
00325     LCDD_UpdatePartialWindow((uint8_t*)cavas_region_buf,sizeof(cavas_region_buf));
00326 }
00327 
00328 /**
00329  * Update canvas region 4.
00330  */
00331 static void update_region4(void)
00332 {
00333     LCDD_SetUpdateWindowSize(canvas_region[3]);
00334     LCDD_DrawRectangleWithFill(cavas_region_buf,
00335                             0, 
00336                             0, 
00337                             canvas_region[3].width,canvas_region[3].height, 
00338                             COLOR_CONVERT(COLOR_WHITE));
00339                         
00340     draw_random_histogram( canvas_region[3].height + 1, COLOR_CONVERT(COLOR_RED));
00341                     
00342     LCDD_UpdatePartialWindow((uint8_t*)cavas_region_buf,sizeof(cavas_region_buf));
00343 }
00344 
00345 /**
00346  *  \brief LCD Application entry point.
00347  *
00348  *  \return Unused (ANSI-C compatibility).
00349  */
00350 extern int main( void )
00351 {
00352     uint32_t i, j;
00353 
00354     int32_t dX, dY;
00355     uint32_t region1_pos = 0;
00356     uint32_t region2_x,region2_y;
00357     TimeEvent *pEvent;
00358     uint32_t alpha = 0;
00359     int8_t   alpha_direction = 4;
00360 
00361     /* Disable watchdog */
00362     WDT_Disable( WDT ) ;
00363 
00364     SCB_EnableICache();
00365     SCB_EnableDCache();
00366 
00367     /* Output example information */
00368     printf( "-- LCD EBI Example %s --\n\r", SOFTPACK_VERSION ) ;
00369     printf( "-- %s\n\r", BOARD_NAME ) ;
00370     printf( "-- Compiled: %s %s With %s--\n\r", __DATE__, __TIME__ , COMPILER_NAME);
00371 
00372 #if defined USE_SDRAM
00373     BOARD_ConfigureSdram();
00374 #endif
00375     PMC_EnablePeripheral(ID_TRNG);
00376 
00377     /* Configure systick for 1 ms. */
00378     TimeTick_Configure();
00379 
00380     RegionTimeEvent[0].event = 1;
00381     RegionTimeEvent[0].time_tick = 1;
00382     RegionTimeEvent[0].time_start = 0;
00383     RegionTimeEvent[0].pPreEvent = 0;
00384     RegionTimeEvent[0].pNextEvent = &RegionTimeEvent[1];
00385 
00386     RegionTimeEvent[1].event = 2;
00387     RegionTimeEvent[1].time_tick = 500;
00388     RegionTimeEvent[1].time_start = 0;
00389     RegionTimeEvent[1].pPreEvent = &RegionTimeEvent[0];
00390     RegionTimeEvent[1].pNextEvent = &RegionTimeEvent[2];
00391 
00392     RegionTimeEvent[2].event = 3;
00393     RegionTimeEvent[2].time_tick = 20;
00394     RegionTimeEvent[2].time_start = 0;
00395     RegionTimeEvent[2].pPreEvent = &RegionTimeEvent[2];
00396     RegionTimeEvent[2].pNextEvent = &RegionTimeEvent[3];
00397 
00398     RegionTimeEvent[3].event = 4;
00399     RegionTimeEvent[3].time_tick = 300;
00400     RegionTimeEvent[3].time_start = 0;
00401     RegionTimeEvent[3].pPreEvent = &RegionTimeEvent[2];
00402     RegionTimeEvent[3].pNextEvent = 0;
00403 
00404     SetTimeEvent(RegionTimeEvent);
00405 
00406     pEvent = RegionTimeEvent;
00407 
00408     /* Initialize LCD and its interface */
00409     LCDD_Initialize(LCD_MODE, &lcdEbiDma, 1);
00410 
00411     init_canvas_region();
00412     LCDD_SetUpdateWindowSize(lcd_rc);
00413 
00414     LCDD_SetUpdateWindowSize(canvas_region[0]);
00415     LCDD_DrawRectangleWithFill(cavas_region_buf, 
00416                             canvas_region[0].x, 
00417                             canvas_region[0].y, 
00418                             canvas_region[0].width,canvas_region[0].height, 
00419                             COLOR_CONVERT(COLOR_BLUE));
00420                         
00421     draw_coordinate_axis(cavas_region_buf,
00422                         4,
00423                         canvas_region[0].height - 3,
00424                         canvas_region[0].width,
00425                         0,
00426                         1,
00427                         COLOR_CONVERT(COLOR_WHITE));
00428                     
00429     draw_sin_wave(cavas_region_buf,
00430                 4,
00431                 155,
00432                 COLOR_CONVERT(COLOR_WHITE));
00433 
00434     LCDD_UpdatePartialWindow((uint8_t*)cavas_region_buf,sizeof(cavas_region_buf));
00435 
00436     LCDD_SetUpdateWindowSize(canvas_region[1]);
00437     LCDD_DrawRectangleWithFill(cavas_region_buf,
00438                             0, 
00439                             0, 
00440                             canvas_region[1].width,
00441                             canvas_region[1].height, 
00442                             COLOR_CONVERT(COLOR_GREEN));
00443     LCD_DrawString(cavas_region_buf,10, 5, "SAMV71",  COLOR_CONVERT(COLOR_BLACK));
00444     LCDD_UpdatePartialWindow((uint8_t*)cavas_region_buf,sizeof(cavas_region_buf));
00445 
00446     LCDD_SetUpdateWindowSize(canvas_region[2]);
00447     LCDD_DrawRectangleWithFill(cavas_region_buf,
00448                             0, 
00449                             0, 
00450                             canvas_region[2].width,
00451                             canvas_region[2].height, 
00452                             COLOR_CONVERT(COLOR_MAGENTA));
00453     i = ((canvas_region[2].width + 1) - DEMO_IMAGE_WIDTH) / 2;
00454     j = ((canvas_region[2].height + 1) - DEMO_IMAGE_HEIGHT) / 2;
00455     LCDD_BitBlt(cavas_region_buf, i, j, 
00456                 canvas_region[2].width + 1, canvas_region[2].height + 1,
00457                 (LcdColor_t *)gImageBuffer, 0, 0,
00458                 DEMO_IMAGE_WIDTH, DEMO_IMAGE_HEIGHT);
00459     LCDD_UpdatePartialWindow((uint8_t*)cavas_region_buf,sizeof(cavas_region_buf));
00460 
00461     LCDD_SetUpdateWindowSize(canvas_region[3]);
00462     LCDD_DrawRectangleWithFill(cavas_region_buf,
00463                             0, 
00464                             0, 
00465                             canvas_region[3].width,
00466                             canvas_region[3].height, 
00467                             COLOR_CONVERT(COLOR_WHITE));
00468                         
00469     draw_random_histogram(canvas_region[3].height + 1,
00470                         COLOR_CONVERT(COLOR_RED));
00471                     
00472     LCDD_UpdatePartialWindow((uint8_t*)cavas_region_buf,sizeof(cavas_region_buf));
00473 
00474     region2_x = 0;
00475     region2_y = 0;
00476     dX = 2;
00477     dY = 2;
00478     RegionTimeEvent[0].time_start = 1;
00479     RegionTimeEvent[1].time_start = 1;
00480     RegionTimeEvent[2].time_start = 1;
00481     RegionTimeEvent[3].time_start = 1;
00482     while(1) {
00483         while(pEvent) {
00484             if(pEvent->occur) {
00485                 pEvent->occur = 0;
00486                 switch(pEvent->event) {
00487                 case 1:
00488                     update_region1(region1_pos);
00489                     pEvent->time_tick = 1;
00490                     pEvent->time_start = 1;
00491                     if(region1_pos == 236)
00492                         region1_pos = 0;
00493                     else
00494                         region1_pos++;
00495                     pEvent = pEvent->pNextEvent;
00496                     break;
00497                 case 2:
00498                     TRNG->TRNG_CR = TRNG_CR_KEY_PASSWD | TRNG_CR_ENABLE;
00499                     while(!(TRNG->TRNG_ISR & TRNG_ISR_DATRDY));
00500                     i = TRNG->TRNG_ODATA;
00501                     j = (i >> 16) & 0x1F;
00502                     region2_x =i & 0xFF;
00503                     region2_y =(i >> 8)&0xFF;
00504                     region2_x = region2_x * (canvas_region[1].width - 80) / 0xFF;
00505                     region2_y = region2_y * (canvas_region[1].height - 20) / 0xFF;
00506                     update_region2(region2_x,region2_y,COLOR_CONVERT(gColorArray[j]));
00507                     if((region2_x >= (canvas_region[1].width - 80)) 
00508                             && (region2_y < (canvas_region[1].height - 20))) {
00509                         region2_x -=dX;
00510                         dX=-dX;
00511                     } else if((region2_x < (canvas_region[1].width - 80)) 
00512                             && (region2_y >= (canvas_region[1].height - 20))) {
00513                         region2_y -=dY;
00514                         dY=-dY;
00515                     }
00516                     pEvent->time_tick = 500;
00517                     pEvent->time_start = 1;
00518                     pEvent = pEvent->pNextEvent;
00519                     break;
00520                 case 3:
00521                     update_region3(alpha);
00522                     alpha += alpha_direction;
00523                     if(alpha >= 255)
00524                         alpha_direction = -4;
00525                     else if(alpha <= 0)
00526                         alpha_direction = 4;
00527                     pEvent->time_tick = 20;
00528                     pEvent->time_start = 1;
00529                     pEvent = pEvent->pNextEvent;
00530                     break;
00531                 case 4:
00532                     update_region4();
00533                     pEvent->time_tick = 300;
00534                     pEvent->time_start = 1;
00535                     break;
00536                 }
00537             } else {
00538                 pEvent = RegionTimeEvent;
00539             }
00540         }
00541     }
00542 }
00543 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines