Skip to content

Commit ca31bda

Browse files
committed
Removed printf debug lines
1 parent b4de450 commit ca31bda

File tree

3 files changed

+5
-23
lines changed

3 files changed

+5
-23
lines changed

libraries/mbed/common/wait_api.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,6 @@ void wait_ms(int ms) {
2525
}
2626

2727
void wait_us(int us) {
28-
printf("Here!\r\n");
2928
uint32_t start = us_ticker_read();
30-
printf("next\r\n");
3129
while ((us_ticker_read() - start) < us);
32-
printf("End\r\n");
3330
}

libraries/mbed/targets/cmsis/TARGET_NXP/TARGET_LPC11XX/cmsis_nvic.c

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,25 +31,19 @@
3131
#define NVIC_RAM_VECTOR_ADDRESS (0x10000000) // Vectors positioned at start of RAM
3232

3333
void NVIC_SetVector(IRQn_Type IRQn, uint32_t vector) {
34-
printf("X\r\n");
3534
int i;
36-
printf("0a\r\n");
3735
// Space for dynamic vectors, initialised to allocate in R/W
3836
static volatile uint32_t* vectors = (uint32_t*)NVIC_RAM_VECTOR_ADDRESS;
39-
printf("1a\r\n");
37+
4038
// Copy and switch to dynamic vectors if first time called
4139
if((LPC_SYSCON->SYSMEMREMAP & 0x3) != 0x1) {
42-
printf("2a\r\n");
4340
uint32_t *old_vectors = (uint32_t *)0; // FLASH vectors are at 0x0
44-
printf("Old_vectors: %i\r\n", old_vectors);
4541
for(i = 0; i < NVIC_NUM_VECTORS; i++) {
46-
printf("3a\r\n");
4742
vectors[i] = old_vectors[i];
4843
}
49-
printf("4a\r\n");
5044
LPC_SYSCON->SYSMEMREMAP = 0x1; // Remaps 0x0-0x1FF FLASH block to RAM block
5145
}
52-
printf("5a\r\n");
46+
5347
// Set the vector
5448
vectors[IRQn + 16] = vector;
5549
}

libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11XX/us_ticker.c

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,35 +23,26 @@
2323
int us_ticker_inited = 0;
2424

2525
void us_ticker_init(void) {
26-
printf("0\r\n");
27-
2826
if (us_ticker_inited) return;
2927
us_ticker_inited = 1;
3028

31-
printf("1\r\n");
3229
LPC_SYSCON->SYSAHBCLKCTRL |= (1<<10); // Clock TIMER_1
33-
printf("2\r\n");
3430
uint32_t PCLK = SystemCoreClock;
35-
printf("3\r\n");
31+
3632
US_TICKER_TIMER->TCR = 0x2; // reset
37-
printf("4\r\n");
33+
3834
uint32_t prescale = PCLK / 1000000; // default to 1MHz (1 us ticks)
39-
printf("5\r\n");
4035
US_TICKER_TIMER->PR = prescale - 1;
41-
printf("6\r\n");
4236
US_TICKER_TIMER->TCR = 1; // enable = 1, reset = 0
43-
printf("7\r\n");
37+
4438
NVIC_SetVector(US_TICKER_TIMER_IRQn, (uint32_t)us_ticker_irq_handler);
45-
printf("8\r\n");
4639
NVIC_EnableIRQ(US_TICKER_TIMER_IRQn);
4740
}
4841

4942
uint32_t us_ticker_read() {
5043
if (!us_ticker_inited)
5144
us_ticker_init();
5245

53-
printf("Hello!!!\r\n");
54-
5546
return US_TICKER_TIMER->TC;
5647
}
5748

0 commit comments

Comments
 (0)