コード例 #1
0
ファイル: SccbRegister.cs プロジェクト: Saturi92/OV7670_AVR
 public bool AddAndValueEquals(SccbRegister other)
 {
     if ((MyAddress.getByte() == other.MyAddress.getByte()) && (Value.getByte() == other.Value.getByte()))
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
コード例 #2
0
ファイル: Ov7670Device.cs プロジェクト: Saturi92/OV7670_AVR
 public void writeAllRegister()
 {
     if (_RegisterToWrite.Count > 0)
     {
         ErrorCode = 0;
         SccbRegister nextRegister = _RegisterToWrite.Dequeue();
         writeRegister(nextRegister.MyAddress.getByte(), nextRegister.Value.getByte());
     }
     else
     {
         Programstatus = -1;
     }
 }
コード例 #3
0
ファイル: Ov7670Device.cs プロジェクト: Saturi92/OV7670_AVR
        //Constructor
        public Ov7670Device()
        {
            //Programstatus
            Programstatus = -1;
            ErrorCode     = 0;
            //initiate the Register
            RegisterValue defaultValue = new RegisterValue();

            defaultValue.setByte(0x00);                       //initiate value 0 for each register
            for (int i = 0; i < SccbRegisterList.Length; i++) //Create Setting Register with the Addresses from 0 to the Amount of the Registers
            {
                SccbRegisterList[i] = new SccbRegister((byte)i, defaultValue);
            }

            //initialize the COMPort
            _comPort = new SerialPort();
            _comPort.DataReceived += ComPortDataReceived;

            //initiate Variables
            _rowCount = 0;

            _picture         = new ImageFile();
            rowRepeatCounter = 0;

            //Statusregister. This register are relevant for the general adjustment of the sensor. These register addresses will bre read when Camera Status is requested
            StatusRegisterList[0]  = 0x0C;
            StatusRegisterList[1]  = 0x12;
            StatusRegisterList[2]  = 0x1C;
            StatusRegisterList[3]  = 0x1D;
            StatusRegisterList[4]  = 0x3A;
            StatusRegisterList[5]  = 0x3D;
            StatusRegisterList[6]  = 0x3E;
            StatusRegisterList[7]  = 0x40;  //COM15 - RGB444 Mode
            StatusRegisterList[8]  = 0x42;
            StatusRegisterList[9]  = 0x70;
            StatusRegisterList[10] = 0x71;
            StatusRegisterList[11] = 0x0A;
            StatusRegisterList[12] = 0x0B;
        }
コード例 #4
0
ファイル: Ov7670Device.cs プロジェクト: Saturi92/OV7670_AVR
 public void addRegisterToWrite(SccbRegister RegisterToAdd)
 {
     _RegisterToWrite.Enqueue(RegisterToAdd);
 }