mirror of
https://gitea.osmocom.org/sim-card/simtrace2.git
synced 2026-03-18 14:28:33 +03:00
fix newline \n\r with \r\n
This commit is contained in:
@@ -767,7 +767,7 @@ static void UDP_EndpointHandler(uint8_t bEndpoint)
|
||||
}
|
||||
else {
|
||||
// Acknowledge interrupt
|
||||
TRACE_ERROR("Error Wr%d, %x\n\r", bEndpoint, pEndpoint->state);
|
||||
TRACE_ERROR("Error Wr%d, %x\r\n", bEndpoint, pEndpoint->state);
|
||||
CLEAR_CSR(bEndpoint, UDP_CSR_TXCOMP);
|
||||
}
|
||||
}
|
||||
@@ -914,11 +914,11 @@ static inline uint8_t UDP_Write(uint8_t bEndpoint,
|
||||
/* int i;
|
||||
for (i = 0; i < dLength; i++) {
|
||||
if (!(i%16)) {
|
||||
printf("\n\r");
|
||||
printf("\r\n");
|
||||
}
|
||||
printf("0x%x ", ((uint8_t*)pData)[i]);
|
||||
}
|
||||
printf("\n\r");
|
||||
printf("\r\n");
|
||||
*/
|
||||
|
||||
/* Setup the transfer descriptor */
|
||||
@@ -1053,11 +1053,11 @@ static inline uint8_t UDP_Read(uint8_t bEndpoint,
|
||||
/* int i;
|
||||
for (i = 0; i < dLength; i++) {
|
||||
if (!(i%16)) {
|
||||
printf("\n\r");
|
||||
printf("\r\n");
|
||||
}
|
||||
printf("0x%x ", ((uint8_t*)pData)[i]);
|
||||
}
|
||||
printf("\n\r");
|
||||
printf("\r\n");
|
||||
*/
|
||||
|
||||
/* Set the transfer descriptor */
|
||||
@@ -1114,7 +1114,7 @@ void USBD_IrqHandler(void)
|
||||
/* Return immediately if there is no interrupt to service */
|
||||
if (status == 0) {
|
||||
|
||||
TRACE_DEBUG_WP(".\n\r");
|
||||
TRACE_DEBUG_WP(".\r\n");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1212,7 +1212,7 @@ void USBD_IrqHandler(void)
|
||||
|
||||
if (status != 0) {
|
||||
|
||||
TRACE_DEBUG_WP("\n\r - ");
|
||||
TRACE_DEBUG_WP("\r\n - ");
|
||||
}
|
||||
}
|
||||
eptnum++;
|
||||
@@ -1221,7 +1221,7 @@ void USBD_IrqHandler(void)
|
||||
|
||||
/* Toggle LED back to its previous state */
|
||||
TRACE_DEBUG_WP("!");
|
||||
TRACE_DEBUG_WP("\n\r");
|
||||
TRACE_DEBUG_WP("\r\n");
|
||||
if (USBD_GetState() >= USBD_STATE_POWERED) {
|
||||
|
||||
//LED_Clear(USBD_LEDUSB);
|
||||
@@ -1581,7 +1581,7 @@ void USBD_HAL_SetConfiguration(uint8_t cfgnum)
|
||||
*/
|
||||
void USBD_HAL_Init(void)
|
||||
{
|
||||
TRACE_DEBUG("%s\n\r", "USBD_HAL_Init");
|
||||
TRACE_DEBUG("%s\r\n", "USBD_HAL_Init");
|
||||
|
||||
/* Must before USB & TXVC access! */
|
||||
UDP_EnablePeripheralClock();
|
||||
@@ -1610,7 +1610,7 @@ uint8_t USBD_HAL_Stall(uint8_t bEP)
|
||||
|
||||
/* Check that endpoint is in Idle state */
|
||||
if (pEndpoint->state != UDP_ENDPOINT_IDLE) {
|
||||
TRACE_WARNING("UDP_Stall: EP%d locked\n\r", bEP);
|
||||
TRACE_WARNING("UDP_Stall: EP%d locked\r\n", bEP);
|
||||
return USBD_STATUS_LOCKED;
|
||||
}
|
||||
/* STALL endpoint */
|
||||
|
||||
@@ -163,7 +163,7 @@ extern void EFC_TranslateAddress( Efc** ppEfc, uint32_t dwAddress, uint16_t* pwP
|
||||
wPage = (dwAddress - IFLASH_ADDR) / IFLASH_PAGE_SIZE;
|
||||
wOffset = (dwAddress - IFLASH_ADDR) % IFLASH_PAGE_SIZE;
|
||||
|
||||
TRACE_DEBUG( "Translated 0x%08lX to page=%d and offset=%d\n\r", dwAddress, wPage, wOffset ) ;
|
||||
TRACE_DEBUG( "Translated 0x%08lX to page=%d and offset=%d\r\n", dwAddress, wPage, wOffset ) ;
|
||||
/* Store values */
|
||||
if ( pEfc )
|
||||
{
|
||||
|
||||
@@ -134,7 +134,7 @@ static void ComputeLockRange( uint32_t dwStart, uint32_t dwEnd, uint32_t *pdwAct
|
||||
// Store actual page numbers
|
||||
EFC_ComputeAddress( pStartEfc, wActualStartPage, 0, pdwActualStart ) ;
|
||||
EFC_ComputeAddress( pEndEfc, wActualEndPage, 0, pdwActualEnd ) ;
|
||||
TRACE_DEBUG( "Actual lock range is 0x%06lX - 0x%06lX\n\r", *pdwActualStart, *pdwActualEnd ) ;
|
||||
TRACE_DEBUG( "Actual lock range is 0x%06lX - 0x%06lX\r\n", *pdwActualStart, *pdwActualEnd ) ;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -104,7 +104,7 @@ extern void PioInterruptHandler( uint32_t id, Pio *pPio )
|
||||
/* Check pending events */
|
||||
if ( status != 0 )
|
||||
{
|
||||
TRACE_DEBUG( "PIO interrupt on PIO controller #%" PRIu32 "\n\r", id ) ;
|
||||
TRACE_DEBUG( "PIO interrupt on PIO controller #%" PRIu32 "\r\n", id ) ;
|
||||
|
||||
/* Find triggering source */
|
||||
i = 0;
|
||||
@@ -119,7 +119,7 @@ extern void PioInterruptHandler( uint32_t id, Pio *pPio )
|
||||
/* Source has PIOs whose statuses have changed */
|
||||
if ( (status & _aIntSources[i].pPin->mask) != 0 )
|
||||
{
|
||||
TRACE_DEBUG( "Interrupt source #%" PRIu32 " triggered\n\r", i ) ;
|
||||
TRACE_DEBUG( "Interrupt source #%" PRIu32 " triggered\r\n", i ) ;
|
||||
|
||||
_aIntSources[i].handler(_aIntSources[i].pPin);
|
||||
status &= ~(_aIntSources[i].pPin->mask);
|
||||
@@ -177,13 +177,13 @@ extern void PIOC_IrqHandler( void )
|
||||
*/
|
||||
extern void PIO_InitializeInterrupts( uint32_t dwPriority )
|
||||
{
|
||||
TRACE_DEBUG( "PIO_Initialize()\n\r" ) ;
|
||||
TRACE_DEBUG( "PIO_Initialize()\r\n" ) ;
|
||||
|
||||
/* Reset sources */
|
||||
_dwNumSources = 0 ;
|
||||
|
||||
/* Configure PIO interrupt sources */
|
||||
TRACE_DEBUG( "PIO_Initialize: Configuring PIOA\n\r" ) ;
|
||||
TRACE_DEBUG( "PIO_Initialize: Configuring PIOA\r\n" ) ;
|
||||
PMC_EnablePeripheral( ID_PIOA ) ;
|
||||
PIOA->PIO_ISR ;
|
||||
PIOA->PIO_IDR = 0xFFFFFFFF ;
|
||||
@@ -192,7 +192,7 @@ extern void PIO_InitializeInterrupts( uint32_t dwPriority )
|
||||
NVIC_SetPriority( PIOA_IRQn, dwPriority ) ;
|
||||
NVIC_EnableIRQ( PIOA_IRQn ) ;
|
||||
|
||||
TRACE_DEBUG( "PIO_Initialize: Configuring PIOB\n\r" ) ;
|
||||
TRACE_DEBUG( "PIO_Initialize: Configuring PIOB\r\n" ) ;
|
||||
PMC_EnablePeripheral( ID_PIOB ) ;
|
||||
PIOB->PIO_ISR ;
|
||||
PIOB->PIO_IDR = 0xFFFFFFFF ;
|
||||
@@ -201,7 +201,7 @@ extern void PIO_InitializeInterrupts( uint32_t dwPriority )
|
||||
NVIC_SetPriority( PIOB_IRQn, dwPriority ) ;
|
||||
NVIC_EnableIRQ( PIOB_IRQn ) ;
|
||||
|
||||
TRACE_DEBUG( "PIO_Initialize: Configuring PIOC\n\r" ) ;
|
||||
TRACE_DEBUG( "PIO_Initialize: Configuring PIOC\r\n" ) ;
|
||||
PMC_EnablePeripheral( ID_PIOC ) ;
|
||||
PIOC->PIO_ISR ;
|
||||
PIOC->PIO_IDR = 0xFFFFFFFF ;
|
||||
@@ -234,7 +234,7 @@ extern void PIO_ConfigureIt( const Pin *pPin, void (*handler)( const Pin* ) )
|
||||
Pio* pio ;
|
||||
InterruptSource* pSource ;
|
||||
|
||||
TRACE_DEBUG( "PIO_ConfigureIt()\n\r" ) ;
|
||||
TRACE_DEBUG( "PIO_ConfigureIt()\r\n" ) ;
|
||||
|
||||
assert( pPin ) ;
|
||||
pio = pPin->pio ;
|
||||
@@ -242,7 +242,7 @@ extern void PIO_ConfigureIt( const Pin *pPin, void (*handler)( const Pin* ) )
|
||||
pSource = find_intsource4pin(pPin);
|
||||
if (!pSource) {
|
||||
/* Define new source */
|
||||
TRACE_DEBUG( "PIO_ConfigureIt: Defining new source #%" PRIu32 ".\n\r", _dwNumSources ) ;
|
||||
TRACE_DEBUG( "PIO_ConfigureIt: Defining new source #%" PRIu32 ".\r\n", _dwNumSources ) ;
|
||||
assert( _dwNumSources < MAX_INTERRUPT_SOURCES ) ;
|
||||
pSource = &(_aIntSources[_dwNumSources]) ;
|
||||
pSource->pPin = pPin ;
|
||||
@@ -288,7 +288,7 @@ extern void PIO_ConfigureIt( const Pin *pPin, void (*handler)( const Pin* ) )
|
||||
*/
|
||||
extern void PIO_EnableIt( const Pin *pPin )
|
||||
{
|
||||
TRACE_DEBUG( "PIO_EnableIt()\n\r" ) ;
|
||||
TRACE_DEBUG( "PIO_EnableIt()\r\n" ) ;
|
||||
|
||||
assert( pPin != NULL ) ;
|
||||
|
||||
@@ -320,7 +320,7 @@ extern void PIO_DisableIt( const Pin *pPin )
|
||||
{
|
||||
assert( pPin != NULL ) ;
|
||||
|
||||
TRACE_DEBUG( "PIO_DisableIt()\n\r" ) ;
|
||||
TRACE_DEBUG( "PIO_DisableIt()\r\n" ) ;
|
||||
|
||||
pPin->pio->PIO_IDR = pPin->mask;
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ extern void PMC_EnablePeripheral( uint32_t dwId )
|
||||
{
|
||||
if ( (PMC->PMC_PCSR0 & ((uint32_t)1 << dwId)) == ((uint32_t)1 << dwId) )
|
||||
{
|
||||
TRACE_DEBUG( "PMC_EnablePeripheral: clock of peripheral" " %" PRIu32 " is already enabled\n\r", dwId ) ;
|
||||
TRACE_DEBUG( "PMC_EnablePeripheral: clock of peripheral" " %" PRIu32 " is already enabled\r\n", dwId ) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -75,7 +75,7 @@ extern void PMC_EnablePeripheral( uint32_t dwId )
|
||||
dwId -= 32;
|
||||
if ((PMC->PMC_PCSR1 & ((uint32_t)1 << dwId)) == ((uint32_t)1 << dwId))
|
||||
{
|
||||
TRACE_DEBUG( "PMC_EnablePeripheral: clock of peripheral" " %" PRIu32 " is already enabled\n\r", dwId + 32 ) ;
|
||||
TRACE_DEBUG( "PMC_EnablePeripheral: clock of peripheral" " %" PRIu32 " is already enabled\r\n", dwId + 32 ) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -100,7 +100,7 @@ extern void PMC_DisablePeripheral( uint32_t dwId )
|
||||
{
|
||||
if ( (PMC->PMC_PCSR0 & ((uint32_t)1 << dwId)) != ((uint32_t)1 << dwId) )
|
||||
{
|
||||
TRACE_DEBUG("PMC_DisablePeripheral: clock of peripheral" " %" PRIu32 " is not enabled\n\r", dwId ) ;
|
||||
TRACE_DEBUG("PMC_DisablePeripheral: clock of peripheral" " %" PRIu32 " is not enabled\r\n", dwId ) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -112,7 +112,7 @@ extern void PMC_DisablePeripheral( uint32_t dwId )
|
||||
dwId -= 32 ;
|
||||
if ( (PMC->PMC_PCSR1 & ((uint32_t)1 << dwId)) != ((uint32_t)1 << dwId) )
|
||||
{
|
||||
TRACE_DEBUG( "PMC_DisablePeripheral: clock of peripheral" " %" PRIu32 " is not enabled\n\r", dwId + 32 ) ;
|
||||
TRACE_DEBUG( "PMC_DisablePeripheral: clock of peripheral" " %" PRIu32 " is not enabled\r\n", dwId + 32 ) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -132,7 +132,7 @@ extern void PMC_EnableAllPeripherals( void )
|
||||
PMC->PMC_PCER1 = MASK_STATUS1 ;
|
||||
while ( (PMC->PMC_PCSR1 & MASK_STATUS1) != MASK_STATUS1 ) ;
|
||||
|
||||
TRACE_DEBUG( "Enable all periph clocks\n\r" ) ;
|
||||
TRACE_DEBUG( "Enable all periph clocks\r\n" ) ;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -146,7 +146,7 @@ extern void PMC_DisableAllPeripherals( void )
|
||||
PMC->PMC_PCDR1 = MASK_STATUS1 ;
|
||||
while ( (PMC->PMC_PCSR1 & MASK_STATUS1) != 0 ) ;
|
||||
|
||||
TRACE_DEBUG( "Disable all periph clocks\n\r" ) ;
|
||||
TRACE_DEBUG( "Disable all periph clocks\r\n" ) ;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -198,7 +198,7 @@ void USART_Write(
|
||||
|
||||
if (timeOut == 0) {
|
||||
|
||||
TRACE_ERROR("USART_Write: Timed out.\n\r");
|
||||
TRACE_ERROR("USART_Write: Timed out.\r\n");
|
||||
return;
|
||||
}
|
||||
timeOut--;
|
||||
@@ -269,7 +269,7 @@ uint16_t USART_Read(
|
||||
|
||||
if (timeOut == 0) {
|
||||
|
||||
TRACE_ERROR( "USART_Read: Timed out.\n\r" ) ;
|
||||
TRACE_ERROR( "USART_Read: Timed out.\r\n" ) ;
|
||||
return 0;
|
||||
}
|
||||
timeOut--;
|
||||
|
||||
Reference in New Issue
Block a user