aboutsummaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
authorChristina Quast <chrysh.ng+git@gmail.com>2015-05-08 16:15:31 +0200
committerChristina Quast <chrysh.ng+git@gmail.com>2015-05-08 16:45:28 +0200
commit14f6399c034b36e0308e46ca4859d3d6e5133b8a (patch)
treed41cb6d7f44cb55e0002f1f1380998cd3eee0c4a /firmware
parent5f83861b1723422054f5c6b3f3c85b1637e75f7e (diff)
tc_etu.c: Removed, because was never used
Since the host side does the parsing of the packets, (not the firmware, as it was in the old simtrace version), we do not need to check for expired max waiting time. Instead, every byte received from the phone is filled into a ring buffer. As soon as the USB endpoint to the host is not busy anymore, it is sent to the host over the respective USB endpoint.
Diffstat (limited to 'firmware')
-rw-r--r--firmware/src_simtrace/tc_etu.c114
1 files changed, 0 insertions, 114 deletions
diff --git a/firmware/src_simtrace/tc_etu.c b/firmware/src_simtrace/tc_etu.c
deleted file mode 100644
index 2e000e3..0000000
--- a/firmware/src_simtrace/tc_etu.c
+++ /dev/null
@@ -1,114 +0,0 @@
-/* SimTrace TC (Timer / Clock) support code
- * (C) 2006 by Harald Welte <hwelte@hmw-consulting.de>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- */
-
-/*------------------------------------------------------------------------------
- * Headers
- *------------------------------------------------------------------------------*/
-#include "board.h"
-
-#include <string.h>
-
-static const Pin pTC[] = {PINS_TC};
-
-/** Global timestamp in milliseconds since start of application */
-volatile uint32_t dwTimeStamp = 0;
-volatile uint8_t timeout_occured = 0;
-
-// FIXME: Do I need the function?:
-/**
- * \brief Handler for Sytem Tick interrupt.
- *
- * Process System Tick Event
- * Increments the timestamp counter.
- */
-void SysTick_Handler( void )
-{
- dwTimeStamp ++;
-}
-
-
-
-void TC0_IrqHandler( void )
-{
- volatile uint32_t dummy;
- /* Clear status bit to acknowledge interrupt */
- dummy = TC0->TC_CHANNEL[ 0 ].TC_SR;
-
- timeout_occured++;
-// printf("++++ TC0_Irq %d\n\r", timeout_occured);
-}
-
-
-void TC0_Counter_Reset( void )
-{
- TC0->TC_CHANNEL[ 0 ].TC_CCR = TC_CCR_SWTRG ;
- timeout_occured = 0;
-}
-
-/* == Timeouts ==
- * One symbol is about 2ms --> Timeout = BUFLEN * 2ms ?
- * For BUFLEN = 64 that is 7.8 Hz
- */
-void Timer_Init()
-{
- uint32_t div;
- uint32_t tcclks;
-
- /** Enable peripheral clock. */
- PMC_EnablePeripheral(ID_TC0);
-
- /** Configure TC for a $ARG1 Hz frequency and trigger on RC compare. */
- TC_FindMckDivisor( 8, BOARD_MCK, &div, &tcclks, BOARD_MCK );
- TRACE_INFO("Chosen div, tcclk: %d, %d\r\n", div, tcclks);
- /* TC_CMR: TC Channel Mode Register: Capture Mode */
- /* CPCTRG: RC Compare resets the counter and starts the counter clock. */
- TC_Configure( TC0, 0, tcclks | TC_CMR_CPCTRG );
- /* TC_RC: TC Register C: contains the Register C value in real time. */
- TC0->TC_CHANNEL[ 0 ].TC_RC = ( BOARD_MCK / div ) / 4;
-
- /* Configure and enable interrupt on RC compare */
- NVIC_EnableIRQ( (IRQn_Type)ID_TC0 );
-
- TC0->TC_CHANNEL[ 0 ].TC_IER = TC_IER_CPCS; /* CPCS: RC Compare */
- TC_Start( TC0, 0 );
-
- return;
-
- /*** From here on we have code based on old simtrace code */
-
- /* Cfg PA4(TCLK0), PA0(TIOA0), PA1(TIOB0) */
-
- PIO_Configure( pTC, PIO_LISTSIZE( pTC ) );
-
-
-
-// FIXME:
-// PIO_ConfigureIt( &pinPhoneRST, ISR_PhoneRST ) ;
-// PIO_EnableIt( &pinPhoneRST ) ;
-
- /* enable interrupts for Compare-C and External Trigger */
- TC0->TC_CHANNEL[0].TC_IER = TC_IER_CPCS | TC_IER_ETRGS;
-
- //...
- /* Enable master clock for TC0 */
-// TC0->TC_CHANNEL[0].TC_CCR
-
- /* Reset to start timers */
- //...
-}