I have a camera setup where I have a Video Out cable plugged into the camera. The camera shuts off its LCD when this cable is plugged in. I would like to be able to briefly see the image on the LCD without having to unplug the cable. I believe this is possible to do, but I'm not sure exactly how to implement all of it.
Here's what I know so far:
My camera (a SD400) sets bit 5 in physw_status[0] when the video cable is plugged in.
Modifying the value of physw_status[0] inside my_kbd_read_keys() will change the behavior of the video cable being plugged in - I can either force the LCD to be on all the time or force it to be off all the time, regardless of whether the video cable is inserted.
Here is the test code I placed inside my_kbd_read_keys() to force the LCD to be on all the time.
physw_status[0] &= ~0x0020;
The following code turns the LCD off and the video output on all the time:
physw_status[0] |= 0x0020;
So far, so good - this proves I can control LCD vs. Video Out via software.
BUT, the camera will only notice that I changed physw_status when I physically plug or unplug the cable.
Maybe the way to force the camera to use my value of physw_status is to use a technique like in kbd_sched_press(), but I do not understand that code well enough to know how. Can anyone help me with this?