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
00001 // 00002 // HDLC based serial communication class. 00003 // 00004 // Created by Benjamin Hepp on 02.04.16. 00005 // Copyright (c) 2016 Benjamin Hepp. All rights reserved. 00006 // 00007 00008 #pragma once 00009 00010 #include <BufferedSerial/BufferedSerial.h> 00011 00012 #include "ait_link.h" 00013 00014 #ifdef __MBED__ 00015 00016 namespace ait { 00017 00018 class AITLinkMbed : public AITLink { 00019 BufferedSerial* _serial; 00020 00021 public: 00022 AITLinkMbed(BufferedSerial* serial, uint16_t max_frame_length = 1024) 00023 : AITLink(max_frame_length), _serial(serial) { 00024 } 00025 00026 virtual ~AITLinkMbed() { 00027 } 00028 00029 virtual void frameHandler(const uint8_t* frame_buffer, size_t frame_length) { 00030 } 00031 00032 virtual void sendChar(uint8_t data) { 00033 _serial->putc(data); 00034 } 00035 }; 00036 00037 } 00038 00039 #endif // __MBED__
Generated on Wed Jul 13 2022 13:24:57 by
1.7.2