code in C++ (#include <iostream>)
unused 31 111 10 À 8 7 6 5 4 3 2 1 765 na i ' ready bit ) LED Intensity field LED aul off bit Given the above register definition: Bit 0: LED light on(set) off(unset) Bits 1 – 7: LED light intensity (0 - 63) Bit 8: ready bit: ready(set)/not-ready(unset) unused > and given that a Control Register variable has been created: unsigned int ControlReg;
Given the above register definition: Bit 0: LED light on(set)/off(unset) Bits 1 - 7: LED light intensity (0 - 63) Bit 8: ready bit: ready(set)/not-ready(unset) unused > , and given that a Control Register variable has been created: unsigned int ControlReg; Write the lines of code that create and store the three masks for the two bits and one field in the ControlRegister, above. Also create store the value of the one shift variable needed. Use an enum.
Referring to the above register, write the line of code that reads the intensity field value and stores it in a variable (use the masks in the enum that you made, above!) Edit View Insert Format Tools Table 12pt v Paragraph | B IV Av av Tev | By v +2
unused 31 111 10 À 8 7 6 5 4 3 2 1 765 na i ' ready bit ) LED Intensity field LED aul off bit Given the above register d
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
unused 31 111 10 À 8 7 6 5 4 3 2 1 765 na i ' ready bit ) LED Intensity field LED aul off bit Given the above register d
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!