Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: TSI USBDevice mbed-dev
Fork of SmartWheels by
Diff: Hardwares/OV7725RegBuf.h
- Revision:
- 25:6f63053cee81
- Parent:
- 13:7dcb1642ef99
--- a/Hardwares/OV7725RegBuf.h Tue Feb 21 19:29:02 2017 +0000
+++ b/Hardwares/OV7725RegBuf.h Tue Feb 21 20:00:41 2017 +0000
@@ -5,18 +5,48 @@
#include <mbed.h>
#include "OV7725RegAddr.h"
+#define WRITE_DEFAULT_REG_ON
+#define WRITE_ORIGIN_REG_ON
+
+namespace SW
+{
+ class Core;
+}
+
class OV7725RegBuf
{
public:
- OV7725RegBuf();
+ OV7725RegBuf(SW::Core & core);
+
~OV7725RegBuf();
uint8_t * GetData();
static bool IsAddressReserved(const uint8_t addr);
+ //Blocking method. Do not use during the running state!!
+ void SCCBWrite(const uint8_t RegAddr, uint8_t Data);
+
+ //Blocking method. Do not use during the running state!!
+ uint8_t SCCBRead(const uint8_t RegAddr);
+
+ //Blocking method. Do not use during the running state!!
+ void ReadRegisters();
+
+#ifdef WRITE_DEFAULT_REG_ON
+ void WriteDefaultRegisters();
+#endif
+
+#ifdef WRITE_ORIGIN_REG_ON
+ void WriteOriginalRegisters();
+#endif
+
private:
- uint8_t m_data[OV7725_LAST_ADDR + 1];
+ uint8_t * m_data;
+
+ SW::Core & m_core;
+
+ I2C m_sccbCtrl;
};
#endif //OV7725_REG_BUF_H
\ No newline at end of file
