AP_HAL_Linux: reorder members and methods and use C++ initializer

This commit is contained in:
Lucas De Marchi 2015-06-24 18:52:50 -03:00 committed by Andrew Tridgell
parent a382ce2b0c
commit ec5d0b6c08
2 changed files with 5 additions and 5 deletions

View File

@ -22,7 +22,6 @@ using namespace Linux;
*/
LinuxI2CDriver::LinuxI2CDriver(AP_HAL::Semaphore* semaphore, const char *device) :
_semaphore(semaphore),
_fd(-1),
_device(device)
{
}

View File

@ -41,11 +41,12 @@ public:
AP_HAL::Semaphore* get_semaphore() { return _semaphore; }
private:
AP_HAL::Semaphore* _semaphore;
bool set_address(uint8_t addr);
int _fd;
AP_HAL::Semaphore* _semaphore;
const char *_device = NULL;
int _fd = -1;
uint8_t _addr;
const char *_device;
};
#endif // __AP_HAL_LINUX_I2CDRIVER_H__