SmartWheels self-driving race car. Designed for NXP Cup. Uses FRDM-KL25Z, area-scan camera, and simple image processing to detect and navigate any NXP spec track.
Dependencies: TSI USBDevice mbed-dev
Fork of SmartWheels by
Hardwares/CamRegBuf.h
- Committer:
- hazheng
- Date:
- 2017-03-02
- Revision:
- 30:ff7f83ad6369
- Child:
- 32:5badeff825dc
File content as of revision 30:ff7f83ad6369:
#pragma once #ifndef CAM_REG_BUF_H #define CAM_REG_BUF_H #include <mbed.h> namespace SW { class Core; } struct sensor_reg; class CamRegBuf { public: CamRegBuf(SW::Core & core, uint8_t writeAddr, uint8_t readAddr); ~CamRegBuf(); //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(); //Blocking method. Do not use during the running state!! void WriteRegSet(const struct sensor_reg * reglist); private: uint8_t m_writeAddr; uint8_t m_readAddr; SW::Core & m_core; I2C m_sccbCtrl; }; #endif //CAM_REG_BUF_H