tcpTest started

This commit is contained in:
2020-11-11 14:19:02 +01:00
parent a8ded4a4f4
commit e306089188
5 changed files with 43 additions and 9 deletions

28
cube/User/Src/tcpTest.c Normal file
View File

@ -0,0 +1,28 @@
#include <tcpTest.h>
#include <stdint.h>
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
#include <socket.h>
#include <logger.h>
#include <PontCoopScheduler.h>
const uint8_t TCPTEST_SOCK;
void tcpTestHandler(void *handle) {
coloredMsg(LOG_YELLOW, "tth");
}
void tcpTestInit() {
int8_t res = socket(TCPTEST_SOCK, Sn_MR_TCP, 12345, SF_IO_NONBLOCK);
coloredMsg(LOG_RED, "tti, socket returns %d", res);
if (res == TCPTEST_SOCK) {
schAdd(tcpTestHandler, NULL, 0, 100);
}
}