What is the difference between the sleepone and sleeptwo fun

What is the difference between the sleep_one and sleep_two functions?

void sleep_one(void)

            SCB_SCR &= ~SCB_SCR_SLEEPDEEP;

            _WFI( );

}

void sleep_two(void)

            SCB_SCR |= SCB_SCR_SLEEPDEEP;

            _WFI( );

Solution

let p=SCB_SCR , q=SCB_SCR_SLEEPDEEP;

The truth table of second function

void sleep_two(void)

            SCB_SCR |= SCB_SCR_SLEEPDEEP;

The truth table for first function

void sleep_one(void)

            SCB_SCR &= ~SCB_SCR_SLEEPDEEP;

Hence both the functions are different.

P Q P
0 0 0
0 1 1
1 0 1
1 1 1
What is the difference between the sleep_one and sleep_two functions? void sleep_one(void) SCB_SCR &= ~SCB_SCR_SLEEPDEEP; _WFI( ); } void sleep_two(void) SC

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site