Skip to content

Commit 873f577

Browse files
committed
clean up
sysview enter/exit isr for wire
1 parent e72b99b commit 873f577

File tree

2 files changed

+21
-4
lines changed

2 files changed

+21
-4
lines changed

libraries/Bluefruit52Lib/examples/Hardware/blinky/blinky.ino

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
Most Arduinos have an on-board LED you can control. On the UNO, MEGA and ZERO
66
it is attached to digital pin 13, on MKR1000 on pin 6. LED_BUILTIN takes care
77
of use the correct LED pin whatever is the board used.
8-
If you want to know what pin the on-board LED is connected to on your Arduino model, check
8+
If you want to know what pin the on-board LED is conn
9+
ected to on your Arduino model, check
910
the Technical Specs of your board at https://www.arduino.cc/en/Main/Products
1011
1112
This example code is in the public domain.
@@ -20,11 +21,11 @@
2021
// the setup function runs once when you press reset or power the board
2122
void setup() {
2223
// initialize digital pin LED_BUILTIN as an output.
23-
pinMode(LED_RED, OUTPUT);
24+
pinMode(LED_BUILTIN, OUTPUT);
2425
}
2526

2627
// the loop function runs over and over again forever
2728
void loop() {
28-
digitalToggle(LED_RED); // turn the LED on (HIGH is the voltage level)
29-
delay(1000); // wait for a second
29+
digitalToggle(LED_BUILTIN); // turn the LED on (HIGH is the voltage level)
30+
delay(1000); // wait for a second
3031
}

libraries/Wire/Wire_nRF52.cpp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,15 @@ extern "C"
399399
{
400400
void SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler(void)
401401
{
402+
#if CFG_DEBUG >= 3
403+
SEGGER_SYSVIEW_RecordEnterISR();
404+
#endif
405+
402406
Wire.onService();
407+
408+
#if CFG_DEBUG >= 3
409+
SEGGER_SYSVIEW_RecordExitISR();
410+
#endif
403411
}
404412
}
405413
#endif
@@ -411,7 +419,15 @@ extern "C"
411419
{
412420
void SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQHandler(void)
413421
{
422+
#if CFG_DEBUG >= 3
423+
SEGGER_SYSVIEW_RecordEnterISR();
424+
#endif
425+
414426
Wire1.onService();
427+
428+
#if CFG_DEBUG >= 3
429+
SEGGER_SYSVIEW_RecordExitISR();
430+
#endif
415431
}
416432
}
417433
#endif

0 commit comments

Comments
 (0)