Doxygenize Linux drivers

This commit is contained in:
Marcelo Aquino
2016-08-16 13:43:24 -03:00
parent 490037d285
commit 211afb17c4
5 changed files with 255 additions and 66 deletions
+16 -18
View File
@@ -190,18 +190,6 @@ void EthernetClient::stop() {
_sock = -1;
}
uint8_t EthernetClient::connected() {
if (_sock == -1) return 0;
if (peek() < 0) {
if (errno == EAGAIN) {
return 1;
}
return 0;
}
return 1;
}
uint8_t EthernetClient::status() {
if (_sock == -1) return ETHERNETCLIENT_W5100_CLOSED;
@@ -232,13 +220,27 @@ uint8_t EthernetClient::status() {
case TCP_CLOSING:
return ETHERNETCLIENT_W5100_CLOSING;
}
} else {
perror("getsockopt");
}
return ETHERNETCLIENT_W5100_CLOSED;
}
uint8_t EthernetClient::connected() {
if (_sock == -1) return 0;
if (peek() < 0) {
if (errno == EAGAIN) {
return 1;
}
return 0;
}
return 1;
}
int EthernetClient::getSocketNumber() {
return _sock;
}
// the next function allows us to use the client returned by
// EthernetServer::available() as the condition in an if-statement.
@@ -249,7 +251,3 @@ EthernetClient::operator bool() {
bool EthernetClient::operator==(const EthernetClient& rhs) {
return _sock == rhs._sock && _sock != -1 && rhs._sock != -1;
}
int EthernetClient::getSocketNumber() {
return _sock;
}