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
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 "ait_link.h" 00011 00012 #ifdef __MBED__ 00013 00014 #include "ait_link_mbed.h" 00015 00016 #else 00017 00018 #include "Serial.h" 00019 00020 namespace ait { 00021 00022 class AITLinkImpl : public AITLink { 00023 public: 00024 AITLinkImpl(Serial* serial, uint16_t max_frame_length = 1024) 00025 : AITLink(max_frame_length), serial_(serial) { 00026 } 00027 00028 virtual ~AITLinkImpl() { 00029 } 00030 00031 virtual void sendChar(uint8_t data) { 00032 serial_->write(data); 00033 } 00034 00035 private: 00036 Serial* serial_; 00037 }; 00038 00039 } 00040 00041 #endif // __MBED__
Generated on Wed Jul 13 2022 13:24:57 by
1.7.2