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.
Dependents: rover_car rover_pc supervisor watering_unit ... more
ssWiSocket.cpp
00001 /** \file ssWiSocket.cpp 00002 * \brief Implementation of the communication socket 00003 * 00004 */ 00005 00006 #include "ssWiSocket.hpp" 00007 #include "ssWiPort.hpp" 00008 #include "ssWi.hpp" 00009 00010 #include <map> 00011 00012 00013 extern std::map<int, ssWiPort> ports; 00014 00015 00016 PortValue ssWiSocket::read () { 00017 return ports[_id].getRXValue(); 00018 } 00019 00020 void ssWiSocket::write (PortValue value) { 00021 ports[_id].setTXValue(value); 00022 } 00023 00024 ssWiSocket* ssWiSocket::createSocket(PortID id) 00025 { 00026 if (!ssWi_setPort(id)) 00027 return NULL; 00028 00029 return new ssWiSocket(id); 00030 }
Generated on Tue Jul 12 2022 15:15:30 by
1.7.2