Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class UDrive {
- public:
- UDrive(HardwareSerial*);
- bool connect();
- private:
- bool fileopen;
- HardwareSerial connection;
- };
- UDrive::UDrive(HardwareSerial* newcon) {
- fileopen = false;
- connection = newcon;
- }
- bool UDrive::connect() {
- connection.flush();
- do {
- connection.print(0x00, BYTE);
- } while(connection.available() == 0);
- return true;
- }
- /* Errors returned:
- C:\Users\Steve\AppData\Local\Temp\build7714903766476072860.tmp\/udrive.cpp:34: error: request for member 'flush' in '((UDrive*)this)->UDrive::connection', which is of non-class type 'HardwareSerial*'
- C:\Users\Steve\AppData\Local\Temp\build7714903766476072860.tmp\/udrive.cpp:37: error: request for member 'print' in '((UDrive*)this)->UDrive::connection', which is of non-class type 'HardwareSerial*'
- C:\Users\Steve\AppData\Local\Temp\build7714903766476072860.tmp\/udrive.cpp:38: error: request for member 'available' in '((UDrive*)this)->UDrive::connection', which is of non-class type 'HardwareSerial*'
- */
Advertisement
Add Comment
Please, Sign In to add comment