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.
ait_link_impl.h
- Committer:
- bhepp
- Date:
- 2016-04-06
- Revision:
- 3:bfc4928cd279
- Parent:
- 2:502d1a5f79a0
File content as of revision 3:bfc4928cd279:
//
// HDLC based serial communication class.
//
// Created by Benjamin Hepp on 02.04.16.
// Copyright (c) 2016 Benjamin Hepp. All rights reserved.
//
#pragma once
#include "ait_link.h"
#ifdef __MBED__
#include "ait_link_mbed.h"
#else
#include "Serial.h"
namespace ait {
class AITLinkImpl : public AITLink {
public:
AITLinkImpl(Serial* serial, uint16_t max_frame_length = 1024)
: AITLink(max_frame_length), serial_(serial) {
}
virtual ~AITLinkImpl() {
}
virtual void sendChar(uint8_t data) {
serial_->write(data);
}
private:
Serial* serial_;
};
}
#endif // __MBED__