sysview enter/exit isr for wire
This commit is contained in:
hathach committed 2020-01-13 17:15:50 +07:00
1 parent e72b99bd33
commit 873f5770a1
2 files changed
+21 -4

No files matched your search

@@ -5,7 +5,8 @@
Most Arduinos have an on-board LED you can control. On the UNO, MEGA and ZERO
it is attached to digital pin 13, on MKR1000 on pin 6. LED_BUILTIN takes care
of use the correct LED pin whatever is the board used.
If you want to know what pin the on-board LED is connected to on your Arduino model, check
If you want to know what pin the on-board LED is conn
ected to on your Arduino model, check
the Technical Specs of your board at https://www.arduino.cc/en/Main/Products
This example code is in the public domain.
@@ -20,11 +21,11 @@
// the setup function runs once when you press reset or power the board
void setup() {
// initialize digital pin LED_BUILTIN as an output.
pinMode(LED_RED, OUTPUT);
pinMode(LED_BUILTIN, OUTPUT);
}
// the loop function runs over and over again forever
void loop() {
digitalToggle(LED_RED); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalToggle(LED_BUILTIN); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
}
+16
View File
@@ -399,7 +399,15 @@ extern "C"
{
void SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler(void)
{
#if CFG_DEBUG >= 3
SEGGER_SYSVIEW_RecordEnterISR();
#endif
Wire.onService();
#if CFG_DEBUG >= 3
SEGGER_SYSVIEW_RecordExitISR();
#endif
}
}
#endif
@@ -411,7 +419,15 @@ extern "C"
{
void SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQHandler(void)
{
#if CFG_DEBUG >= 3
SEGGER_SYSVIEW_RecordEnterISR();
#endif
Wire1.onService();
#if CFG_DEBUG >= 3
SEGGER_SYSVIEW_RecordExitISR();
#endif
}
}
#endif