Small EDMAC refactoring
Some small cleanups regarding EDMAC:
-
edmac_channel_to_index/edmac_index_to_channel: convert edmac channel number to/from index (as used in resource locks - http://www.magiclantern.fm/forum/index.php?topic=6740 )
-
EDMAC info (in Debug menu) refactored to use more API calls from edmac.c
-
edmac_get_dir simplified (direction is given by channel & 0x8); returned value is checked in the Debug menu
-
display the third EDMAC group on DIGIC V cameras (not tested)
-
fix lockup on DIGIC IV cameras in Debug menu
-
find_free_edmac_channels now displays channel numbers, not indices (this one was very easy to forget)
-
CONFIG_ENGINE_RESLOCK is now mandatory everywhere (it's a good way to make sure our EDMAC channels are indeed unused)
Some more fun stuff in the dm-spy-experiments branch: added a logging function for LockEngineResources ( https://bitbucket.org/hudson/magic-lantern/commits/8b5f51e393 ) that prints the list of resources being locked, like this:
#!
ShootPreDevelop:00094d40:00:00: *** LockEngineResources(71e730) x5 from ffa5a0a0:
ShootPreDevelop:00094df4:00:00: 1) 140001 (?)
ShootPreDevelop:00094df4:00:00: 2) 7 (write channel 0x10)
ShootPreDevelop:00094df4:00:00: 3) 10004 (read channel 0xc)
ShootPreDevelop:00094df4:00:00: 4) 20017 (write connection 0x17)
ShootPreDevelop:00094df4:00:00: 5) 3000e (read connection 0xe)