Skip to content

Commit f42a8cc

Browse files
committed
Using built in interrupt/noInterrupt functions in examples
1 parent 734104b commit f42a8cc

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

libraries/PDM/examples/Example1_MicrophoneOutput/Example1_MicrophoneOutput.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ void setup()
4646

4747
void loop()
4848
{
49-
am_hal_interrupt_master_disable();
49+
noInterrupts();
5050

5151
if (myPDM.available())
5252
{
@@ -61,7 +61,7 @@ void loop()
6161
// Go to Deep Sleep until the PDM ISR or other ISR wakes us.
6262
am_hal_sysctrl_sleep(AM_HAL_SYSCTRL_SLEEP_DEEP);
6363

64-
am_hal_interrupt_master_enable();
64+
interrupts();
6565
}
6666

6767
//*****************************************************************************

libraries/PDM/examples/Example2_ConfigureMic/Example2_ConfigureMic.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ void setup()
5858

5959
void loop()
6060
{
61-
am_hal_interrupt_master_disable();
61+
noInterrupts();
6262

6363
if (myPDM.available())
6464
{
@@ -73,7 +73,7 @@ void loop()
7373
// Go to Deep Sleep until the PDM ISR or other ISR wakes us.
7474
am_hal_sysctrl_sleep(AM_HAL_SYSCTRL_SLEEP_DEEP);
7575

76-
am_hal_interrupt_master_enable();
76+
interrupts();
7777
}
7878

7979
//*****************************************************************************

libraries/PDM/examples/Example3_FullConfigure/Example3_FullConfigure.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ void setup()
7070

7171
void loop()
7272
{
73-
am_hal_interrupt_master_disable();
73+
noInterrupts();
7474

7575
if (myPDM.available())
7676
{
@@ -85,7 +85,7 @@ void loop()
8585
// Go to Deep Sleep until the PDM ISR or other ISR wakes us.
8686
am_hal_sysctrl_sleep(AM_HAL_SYSCTRL_SLEEP_DEEP);
8787

88-
am_hal_interrupt_master_enable();
88+
interrupts();
8989
}
9090

9191
//*****************************************************************************

0 commit comments

Comments
 (0)