FreeCalypso > hg > tcs211-c139
comparison chipsetsw/drivers/drv_app/r2d/r2d_task.c @ 0:509db1a7b7b8
initial import: leo2moko-r1
author | Space Falcon <falcon@ivan.Harhan.ORG> |
---|---|
date | Mon, 01 Jun 2015 03:24:05 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:509db1a7b7b8 |
---|---|
1 /** | |
2 | |
3 @file: r2d_task.c | |
4 | |
5 @author Christophe Favergeon | |
6 | |
7 @version 0.5 | |
8 | |
9 Purpose: Refresh task for R2D. It is calling the LCD dependent refresh subroutine | |
10 | |
11 */ | |
12 | |
13 /* | |
14 | |
15 Date Modification | |
16 ------------------------------------ | |
17 06/02/2001 Create | |
18 10/18/2001 Version 0.5 for first integration with Riviera database | |
19 | |
20 | |
21 (C) Copyright 2001 by Texas Instruments Incorporated, All Rights Reserved | |
22 */ | |
23 | |
24 | |
25 | |
26 | |
27 #include "rv/general.h" | |
28 #include "rvf/rvf_api.h" | |
29 #include "rvm/rvm_api.h" | |
30 #include "rvm/rvm_use_id_list.h" | |
31 #include "r2d/r2d_messages.h" | |
32 #include "r2d/r2d_env.h" | |
33 #include "r2d/r2d_config.h" | |
34 #include "r2d/r2d.h" | |
35 #include "r2d/r2d_i.h" | |
36 | |
37 extern void r2d_refresh(void); | |
38 | |
39 extern INT16 r2d_g_refresh_disabled; | |
40 | |
41 /******************************************************************************* | |
42 ** Function r2d_core | |
43 ** | |
44 ** Description Core of the r2d task, which refresh the LCD | |
45 ** | |
46 *******************************************************************************/ | |
47 T_RVM_RETURN r2d_core(void) | |
48 { | |
49 BOOLEAN error_occured = FALSE; | |
50 // T_R2D_EVT * msg_ptr_rx, * msg_ptr_tx; | |
51 | |
52 //r2d_start(); | |
53 | |
54 | |
55 rvf_send_trace("R2D REFRESH TASK STARTED",24, NULL_PARAM, | |
56 RV_TRACE_LEVEL_DEBUG_HIGH, R2D_USE_ID ); | |
57 | |
58 | |
59 /* loop to process messages */ | |
60 while (error_occured == FALSE) | |
61 { | |
62 UINT16 received_event; | |
63 //rvf_send_trace("WAIT EVENT",strlen("WAIT EVENT"), NULL_PARAM, | |
64 // RV_TRACE_LEVEL_DEBUG_HIGH, TRACE_XXX ); | |
65 /* Wait for the necessary events (infinite wait for a msg in the mailbox 0). */ | |
66 received_event = rvf_wait ( EVENT_MASK(RVF_APPL_EVT_0), 0); | |
67 | |
68 //rvf_send_trace("EVENT RECEIVED",strlen("EVENT RECEIVED"), NULL_PARAM, | |
69 // RV_TRACE_LEVEL_DEBUG_HIGH, TRACE_XXX ); | |
70 | |
71 /* If an event related to mailbox 0 is received, then */ | |
72 if (received_event & EVENT_MASK(RVF_APPL_EVT_0) ) | |
73 { | |
74 //rvf_send_trace("GOOD EVENT",strlen("GOOD EVENT"), NULL_PARAM, | |
75 // RV_TRACE_LEVEL_DEBUG_HIGH, TRACE_XXX ); | |
76 | |
77 r2d_g_event_was_sent=FALSE; | |
78 if (r2d_g_refresh_disabled==0) | |
79 r2d_refresh(); | |
80 rvf_delay(RVF_MS_TO_TICKS(R2D_REFRESH_PERIOD)); | |
81 } | |
82 | |
83 } | |
84 | |
85 return RVM_OK; | |
86 } |