tcpTest started
This commit is contained in:
28
cube/User/Src/tcpTest.c
Normal file
28
cube/User/Src/tcpTest.c
Normal 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);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user