FreeCalypso > hg > freecalypso-sw
comparison gsm-fw/bsp/rtc/rtc_task.c @ 161:98be4841eeb7
gsm-fw: RTC code hooked into the build
author | Michael Spacefalcon <msokolov@ivan.Harhan.ORG> |
---|---|
date | Mon, 18 Nov 2013 00:08:43 +0000 |
parents | 3c42e6e5fc04 |
children |
comparison
equal
deleted
inserted
replaced
160:dbfc9ff4e8d2 | 161:98be4841eeb7 |
---|---|
17 * | 17 * |
18 * | 18 * |
19 * (C) Copyright 2001 by Texas Instruments Incorporated, All Rights Reserved | 19 * (C) Copyright 2001 by Texas Instruments Incorporated, All Rights Reserved |
20 */ | 20 */ |
21 | 21 |
22 #include "rtc/rtc_env.h" | 22 #include "rtc_env.h" |
23 | 23 |
24 #include "rv/rv_general.h" | 24 #include "../../riviera/rv/rv_general.h" |
25 #include "rvf/rvf_api.h" | 25 #include "../../riviera/rvf/rvf_api.h" |
26 #include "rvm/rvm_use_id_list.h" | 26 #include "../../riviera/rvm/rvm_use_id_list.h" |
27 | 27 |
28 #define RTC_MAILBOX_USED RVF_TASK_MBOX_0 | 28 #define RTC_MAILBOX_USED RVF_TASK_MBOX_0 |
29 | 29 |
30 /* External declaration until Riviera 1.6 is available*/ | 30 /* External declaration until Riviera 1.6 is available*/ |
31 extern UINT8 rtc_handle_msg(T_RV_HDR* msg_p); | 31 extern UINT8 rtc_handle_msg(T_RV_HDR* msg_p); |
42 * function: rtc_core | 42 * function: rtc_core |
43 */ | 43 */ |
44 T_RV_RET rtc_core(void) | 44 T_RV_RET rtc_core(void) |
45 { | 45 { |
46 BOOLEAN error_occured = FALSE; | 46 BOOLEAN error_occured = FALSE; |
47 T_RV_HDR * msg_ptr; | 47 T_RV_HDR * msg_ptr; |
48 UINT16 received_event; | 48 UINT16 received_event; |
49 | 49 |
50 rvf_send_trace("RTC: Initialization", 19, NULL_PARAM, RV_TRACE_LEVEL_DEBUG_HIGH, RTC_USE_ID ); | 50 rvf_send_trace("RTC: Initialization", 19, NULL_PARAM, RV_TRACE_LEVEL_DEBUG_HIGH, RTC_USE_ID ); |
51 | 51 |
52 /* loop to process messages */ | 52 /* loop to process messages */ |
53 while (error_occured == FALSE) | 53 while (error_occured == FALSE) |
54 { | 54 { |
55 /* Wait for the necessary events. */ | 55 /* Wait for the necessary events. */ |
56 received_event = rvf_wait ( 0xffff,0); | 56 received_event = rvf_wait ( 0xffff,0); |
57 | 57 |
58 if (received_event & RVF_TASK_MBOX_0_EVT_MASK) | 58 if (received_event & RVF_TASK_MBOX_0_EVT_MASK) |
59 { | 59 { |
60 /* Read the message */ | 60 /* Read the message */ |
61 msg_ptr = (T_RV_HDR *) rvf_read_mbox(RTC_MAILBOX_USED); | 61 msg_ptr = (T_RV_HDR *) rvf_read_mbox(RTC_MAILBOX_USED); |