changeset 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 dbfc9ff4e8d2
children 595192258bc9
files gsm-fw/bsp/Makefile gsm-fw/bsp/rtc/Makefile gsm-fw/bsp/rtc/rtc_functions.c gsm-fw/bsp/rtc/rtc_handle_message.c gsm-fw/bsp/rtc/rtc_process.c gsm-fw/bsp/rtc/rtc_task.c
diffstat 6 files changed, 46 insertions(+), 63 deletions(-) [+]
line wrap: on
line diff
--- a/gsm-fw/bsp/Makefile	Sun Nov 17 22:52:52 2013 +0000
+++ b/gsm-fw/bsp/Makefile	Mon Nov 18 00:08:43 2013 +0000
@@ -14,6 +14,7 @@
 	timer1.h timer2.h ulpd.h
 
 SUBDIR=	abb+spi rtc
+SUBDIR_XIPCODE=	abb+spi/xipcode.o rtc/xipcode.o
 
 all:	${IOBJS} ${XOBJS} ${SUBDIR} xipcode.o
 
@@ -23,7 +24,7 @@
 	${CC} ${CFLAGS} -mthumb -c $<
 
 xipcode.o:	${XOBJS} ${SUBDIR}
-	${LD} -r -o $@ ${XOBJS} abb+spi/xipcode.o
+	${LD} -r -o $@ ${XOBJS} ${SUBDIR_XIPCODE}
 
 ${SUBDIR}: FRC
 	cd $@; ${MAKE} ${MFLAGS}
--- a/gsm-fw/bsp/rtc/Makefile	Sun Nov 17 22:52:52 2013 +0000
+++ b/gsm-fw/bsp/rtc/Makefile	Mon Nov 18 00:08:43 2013 +0000
@@ -2,7 +2,7 @@
 CFLAGS=	-O2 -fno-builtin -mthumb-interwork -mthumb
 LD=	arm-elf-ld
 
-OBJS=	rtc_env.o
+OBJS=	rtc_env.o rtc_functions.o rtc_handle_message.o rtc_process.o rtc_task.o
 
 HDRS=	rtc_api.h rtc_config.h rtc_env.h rtc_i.h rtc_messages_i.h \
 	rtc_pool_size.h
--- a/gsm-fw/bsp/rtc/rtc_functions.c	Sun Nov 17 22:52:52 2013 +0000
+++ b/gsm-fw/bsp/rtc/rtc_functions.c	Mon Nov 18 00:08:43 2013 +0000
@@ -9,30 +9,23 @@
 /*   Date: 03/20/01                                                           */
 /******************************************************************************/
 
-#ifndef _WINDOWS
-   #include "l1sw.cfg" 
-   #include "chipset.cfg" 
-#endif
+#include "../../include/config.h"
 
 #include <string.h> /* needed for memset */
-#include "nucleus.h" 
 
-#include "rtc/rtc_messages_i.h"
-#include "rtc/rtc_api.h"
-#include "rtc/rtc_i.h"
-#include "rtc/board/rtc_config.h" 
-
-#include "rvm/rvm_use_id_list.h"
+#include "rtc_messages_i.h"
+#include "rtc_api.h"
+#include "rtc_i.h"
+#include "rtc_config.h" 
 
-#include "memif/mem.h"
-#include "inth/iq.h"
-#include "ulpd/ulpd.h"
+#include "../../riviera/rvm/rvm_use_id_list.h"
 
-#if (CHIPSET == 12)
-  #include "inth/sys_inth.h"
-#else
-  #include "inth/inth.h"
-#endif
+#include "../mem.h"
+#include "../iq.h"
+#include "../ulpd.h"
+#include "../inth.h"
+
+#include "../../nucleus/nucleus.h" 
 
 /* ----- Macro ----- */
 /*-------------------------------------------------------------*/
@@ -337,7 +330,7 @@
     *(volatile UINT8*) RTC_CTRL_REG &= ~RTC_AUTO_COMP;
 
     /* For CHIPSET = 7, 9, 10 or 11, set analog baseband type */
-#if (((CHIPSET == 7) || (CHIPSET == 8) || (CHIPSET == 10) || (CHIPSET == 11)) && (ANLG_FAM == 1))
+#if (((CHIPSET == 7) || (CHIPSET == 8) || (CHIPSET == 10) || (CHIPSET == 11)) && (ANALOG == 1))
    *(volatile UINT8*) RTC_CTRL_REG |= RTC_nDELTA_OMEGA;
 #endif
 
@@ -805,8 +798,3 @@
       }
    }
 }
-
-
-
-/*---------------------------------------------------------------------------------------*/
-
--- a/gsm-fw/bsp/rtc/rtc_handle_message.c	Sun Nov 17 22:52:52 2013 +0000
+++ b/gsm-fw/bsp/rtc/rtc_handle_message.c	Mon Nov 18 00:08:43 2013 +0000
@@ -20,9 +20,9 @@
  */
 
 
-#include "rv/rv_general.h"
-#include "rvf/rvf_api.h"
-#include "rvm/rvm_use_id_list.h"
+#include "../../riviera/rv/rv_general.h"
+#include "../../riviera/rvf/rvf_api.h"
+#include "../../riviera/rvm/rvm_use_id_list.h"
 
 
 /* External declaration */
--- a/gsm-fw/bsp/rtc/rtc_process.c	Sun Nov 17 22:52:52 2013 +0000
+++ b/gsm-fw/bsp/rtc/rtc_process.c	Mon Nov 18 00:08:43 2013 +0000
@@ -1,24 +1,24 @@
-/********************************************************************************/
-/*                                                                              */
-/*      File Name:   rtc_process.c                                              */
-/*                                                                              */
-/*      Purpose:   This file contains routine(s) that dispatch and process      */
-/*               message(s) received from other entity                          */
-/*                                                                              */
-/*      Note:      None.                                                        */
-/*                                                                              */
-/*      Revision History:                                                       */
-/*      03/22/01   Laurent Sollier      Create.                                 */
-/*                                                                              */
-/*   (C) Copyright 2001 by Texas Instruments Incorporated, All Rights Reserved  */
-/*                                                                              */
-/********************************************************************************/
+/******************************************************************************/
+/*                                                                            */
+/*    File Name:   rtc_process.c                                              */
+/*                                                                            */
+/*    Purpose:   This file contains routine(s) that dispatch and process      */
+/*               message(s) received from other entity                        */
+/*                                                                            */
+/*    Note:      None.                                                        */
+/*                                                                            */
+/*    Revision History:                                                       */
+/*    03/22/01   Laurent Sollier      Create.                                 */
+/*                                                                            */
+/* (C) Copyright 2001 by Texas Instruments Incorporated, All Rights Reserved  */
+/*                                                                            */
+/******************************************************************************/
 
-#include "rvf/rvf_api.h"
-#include "rv/rv_general.h"
-#include "rvm/rvm_use_id_list.h"
-#include "rtc/rtc_messages_i.h"
-#include "rtc/rtc_i.h"
+#include "../../riviera/rvf/rvf_api.h"
+#include "../../riviera/rv/rv_general.h"
+#include "../../riviera/rvm/rvm_use_id_list.h"
+#include "rtc_messages_i.h"
+#include "rtc_i.h"
 
 
 void rtc_process(T_RV_HDR * msg_ptr)
@@ -41,9 +41,3 @@
     break;
    }
 }
-
-
-
-
-
-
--- a/gsm-fw/bsp/rtc/rtc_task.c	Sun Nov 17 22:52:52 2013 +0000
+++ b/gsm-fw/bsp/rtc/rtc_task.c	Mon Nov 18 00:08:43 2013 +0000
@@ -19,11 +19,11 @@
  * (C) Copyright 2001 by Texas Instruments Incorporated, All Rights Reserved
  */
 
-#include "rtc/rtc_env.h"
+#include "rtc_env.h"
 
-#include "rv/rv_general.h"
-#include "rvf/rvf_api.h"
-#include "rvm/rvm_use_id_list.h"
+#include "../../riviera/rv/rv_general.h"
+#include "../../riviera/rvf/rvf_api.h"
+#include "../../riviera/rvm/rvm_use_id_list.h"
 
 #define RTC_MAILBOX_USED RVF_TASK_MBOX_0
 
@@ -44,7 +44,7 @@
 T_RV_RET rtc_core(void)
 {   
    BOOLEAN error_occured = FALSE;
-    T_RV_HDR * msg_ptr;
+   T_RV_HDR * msg_ptr;
    UINT16 received_event;
 
    rvf_send_trace("RTC: Initialization", 19, NULL_PARAM, RV_TRACE_LEVEL_DEBUG_HIGH, RTC_USE_ID );
@@ -53,7 +53,7 @@
    while (error_occured == FALSE)
    {
       /* Wait for the necessary events. */
-       received_event = rvf_wait ( 0xffff,0);
+      received_event = rvf_wait ( 0xffff,0);
 
       if (received_event & RVF_TASK_MBOX_0_EVT_MASK)
       {
@@ -65,4 +65,4 @@
    }
 
    return RV_OK;   
-}
\ No newline at end of file
+}