MCPcopy Create free account
hub / github.com/cjcliffe/CubicSDR / comWrite

Function comWrite

external/rs232/rs232-linux.cpp:193–203  ·  view source on GitHub ↗

/

Source from the content-addressed store, hash-verified

191
192/*****************************************************************************/
193int comWrite(int index, const char * buffer, size_t len)
194{
195 if (index >= noDevices || index < 0)
196 return 0;
197 if (comDevices[index].handle <= 0)
198 return 0;
199 int res = write(comDevices[index].handle, buffer, len);
200 if (res < 0)
201 res = 0;
202 return res;
203}
204
205int comRead(int index, char * buffer, size_t len)
206{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected