FreeCalypso > hg > tcs211-fcmodem
comparison chipsetsw/drivers/drv_app/rtc/rtc_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 * @file rtc_task.c | |
3 * | |
4 * Coding of the main RTC function : rtc_core | |
5 * This function loop in the process message function for waiting messages. | |
6 * | |
7 * @author Laurent Sollier (l-sollier@ti.com) | |
8 * @version 0.1 | |
9 */ | |
10 | |
11 /* | |
12 * History: | |
13 * | |
14 * Date Author Modification | |
15 * ------------------------------------ | |
16 * 10/24/2001 L Sollier Create | |
17 * | |
18 * | |
19 * (C) Copyright 2001 by Texas Instruments Incorporated, All Rights Reserved | |
20 */ | |
21 | |
22 #include "rtc/rtc_env.h" | |
23 | |
24 #include "rv/rv_general.h" | |
25 #include "rvf/rvf_api.h" | |
26 #include "rvm/rvm_use_id_list.h" | |
27 | |
28 #define RTC_MAILBOX_USED RVF_TASK_MBOX_0 | |
29 | |
30 /* External declaration until Riviera 1.6 is available*/ | |
31 extern UINT8 rtc_handle_msg(T_RV_HDR* msg_p); | |
32 | |
33 | |
34 | |
35 /** | |
36 * @name Functions implementation | |
37 * | |
38 */ | |
39 /*@{*/ | |
40 | |
41 /** | |
42 * function: rtc_core | |
43 */ | |
44 T_RV_RET rtc_core(void) | |
45 { | |
46 BOOLEAN error_occured = FALSE; | |
47 T_RV_HDR * msg_ptr; | |
48 UINT16 received_event; | |
49 | |
50 rvf_send_trace("RTC: Initialization", 19, NULL_PARAM, RV_TRACE_LEVEL_DEBUG_HIGH, RTC_USE_ID ); | |
51 | |
52 /* loop to process messages */ | |
53 while (error_occured == FALSE) | |
54 { | |
55 /* Wait for the necessary events. */ | |
56 received_event = rvf_wait ( 0xffff,0); | |
57 | |
58 if (received_event & RVF_TASK_MBOX_0_EVT_MASK) | |
59 { | |
60 /* Read the message */ | |
61 msg_ptr = (T_RV_HDR *) rvf_read_mbox(RTC_MAILBOX_USED); | |
62 | |
63 rtc_handle_msg(msg_ptr); | |
64 } | |
65 } | |
66 | |
67 return RV_OK; | |
68 } |