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_mbed.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 <BufferedSerial/BufferedSerial.h>
#include "ait_link.h"
#ifdef __MBED__
namespace ait {
class AITLinkMbed : public AITLink {
BufferedSerial* _serial;
public:
AITLinkMbed(BufferedSerial* serial, uint16_t max_frame_length = 1024)
: AITLink(max_frame_length), _serial(serial) {
}
virtual ~AITLinkMbed() {
}
virtual void frameHandler(const uint8_t* frame_buffer, size_t frame_length) {
}
virtual void sendChar(uint8_t data) {
_serial->putc(data);
}
};
}
#endif // __MBED__