I am following digilent's ZedBoard 4Pcam FMC Adapter Demo project. But I need your help to understand some of the code line.
Could someone help me to figure out in the following code lines? This following code has been taken from main.cc.
/* main.cc */.....//Constructing OV5640 objects in dynamic storage vs. automatic makes//ignoring cameras with init exceptions possible//Since the power enable signals is shared between all FMC Pcam Adapter ports,//cam_a will be the only one controlling it through the gpio_driver.try{
muxch_a_ptr = std::make_unique<TCA9546>(iic_driver,0,1<<0);
cam_a_ptr = std::make_unique<OV5640>(*muxch_a_ptr, nopgpio);}catch(std::runtime_error const& e){
VERBOSE("Camera on port A did not initialize correctly: %s", e.what());}.....
When I open TCA9546.h. I have noticed following lines of code
/**
*
* @param iic is the underlying I2C_Client driver to-be-wrapped
* @param a_pin specifies the mux hardware address pins A2-A0 on its 3 LSB
* @param channel_mask should have the bit(s) corresponding to the
* addressed channel(s) set to 1.
*/
TCA9546(I2C_Client& iic,uint8_t a_pin,uint8_t channel_mask):
iic_(iic), channel_mask_(channel_mask){
dev_address_ &=~0x07;
dev_address_ |=(a_pin &0x07);
reset();}
From above codes, I need your help to understand that how these codes are working to access PCam A in ZedBoard 4PCam FMC Adapter. What is happening here?
Question
Nik
Hello,
I am following digilent's ZedBoard 4Pcam FMC Adapter Demo project. But I need your help to understand some of the code line.
Could someone help me to figure out in the following code lines? This following code has been taken from main.cc.
When I open TCA9546.h. I have noticed following lines of code
From above codes, I need your help to understand that how these codes are working to access PCam A in ZedBoard 4PCam FMC Adapter. What is happening here?
Thanks !
Kind Regards,
Link to comment
Share on other sites
7 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now