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:
- 32:5badeff825dc
- Parent:
- 30:ff7f83ad6369
- Child:
- 87:15fcf7891bf9
File content as of revision 32:5badeff825dc:
#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); //int32_t I2CBufferRead(int32_t ucDevAddr, uint8_t *ucBuffer, int32_t ulSize); //int32_t I2CBufferWrite(int32_t ucDevAddr, uint8_t *ucBuffer, int32_t ulSize); //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