As mentioned on http://www.raspberrypi.org/forums/viewt ... 43&t=83353, we now have a very basic flash driver. Dom is currently doing the release so "sudo rpi-update" should pick it up soon (please watch the Twitter feed if you're a real eager beaver).
Copying my comments from there to here:
It will do NOTHING by default as it needs to be told which GPIOs to use. This uses the same configuration method that has been discussed elsewhere, and the documentation is almost merged via https://github.com/raspberrypi/documentation/pull/105 Please read that first.In basic terms you define up to 2 GPIOs for it.
The first is used to trigger an LED flash or equivalent (not xenon as we don't have a global shutter/reset). Please be aware that the AGC algorithm will use a preflash before the capture to judge how much extra illumination the flash is contributing by the flash and hence how much to adjust the exposure and analogue gain by to compensate. Control the mode of operation with MMAL_PARAMETER_FLASH. The settings are fairly self explanatory.
The second GPIO is used for an indicator/privacy light. It's a legal requirement in some countries to give a visual indication during video recording or on stills capture that a capture has occurred. If set to ON with the new MMAL parameter, then the GPIO will go high for a minimum of (IIRC) 2 secs AFTER the frame has finished being exposed, so it should never interfere with the captured image. (The FORCE_ON setting is a quirky one for a particular requirement where we didn't get told whether recording was happening or not, so it just got set on every frame request of the recording type, and would time out when those requests ended. Probably best to ignore it).
There are now 4 new pins added.
Code: Select all
pin_define@FLASH_0_ENABLE {
type = "absent";
};
pin_define@FLASH_0_INDICATOR {
type = "absent";
};
pin_define@FLASH_1_ENABLE {
type = "absent";
};
pin_define@FLASH_1_INDICATOR {
type = "absent";
};
Rebuilding the blob (see the instructions in the docs) with say
Code: Select all
pin_define@FLASH_0_INDICATOR {
type = "internal";
number = <5>;
};
Dom and I have had a quick chat about whether we change the default association of the camera board LED from effectively a power LED to privacy indicator - current decision is "not now, but maybe". The downside of changing is that it is currently a very useful tell-tale as to whether the module or firmware is doing anything.
I have not and will not be updating Raspistill / Raspivid to select this. I am currently concentrating on firmware issues, but if others wish to make the changes and submit a pull request on github then it will be accepted. As it won't do anything on a default build comments will be required in the app to state that.
WHAT YOU CONNECT TO THE GPIO IS YOUR BUSINESS. The GPIOs only have a limited current drive, so if you are adding real amounts of illumination then you will have to sort out a suitable drive circuit. No liability is accepted for blown GPIOs because you do something silly.
For reference, the flash driver chips we have used on mobile phones will often drive up to 500mA into the LED. If you're aiming for that, then please think about your power supply too.
I will also say again, this is NOT suitable for xenon flashes due to the sensor having a rolling shutter.
Have fun.