1
0

finish receiver

This commit is contained in:
2024-04-20 18:44:37 +02:00
parent 964e9247c4
commit b93c51f369
6 changed files with 270 additions and 18 deletions

View File

@@ -17,9 +17,9 @@ void MacSender(void *argument) {
for(;;) {
//----------------------------------------------------------------------------
//--------------------------------------------------------------------------
// QUEUE READ
//----------------------------------------------------------------------------
//--------------------------------------------------------------------------
retCode = osMessageQueueGet(
queue_macS_id,
&queueMsg,
@@ -31,6 +31,9 @@ void MacSender(void *argument) {
switch(queueMsg.type) {
//----------------------------------------------------------------------
// TOKEN MESSAGE
//----------------------------------------------------------------------
case TOKEN: {
// Get token and save it
memcpy(lastToken, msg, TOKENSIZE-2);
@@ -80,13 +83,17 @@ void MacSender(void *argument) {
break;
}
//----------------------------------------------------------------------
// DATABACK MESSAGE
//----------------------------------------------------------------------
case DATABACK: {
break;
}
//----------------------------------------------------------------------
// NEW TOKEN MESSAGE
//----------------------------------------------------------------------
case NEW_TOKEN: {
lastToken[0] = TOKEN_TAG;
@@ -108,27 +115,34 @@ void MacSender(void *argument) {
break;
}
//----------------------------------------------------------------------
// START MESSAGE
//----------------------------------------------------------------------
case START: {
// Do nothing, don't care to receive start
gTokenInterface.connected = true;
break;
}
//----------------------------------------------------------------------
// STOP MESSAGE
//----------------------------------------------------------------------
case STOP: {
// Do nothing, don't care to receive stop
gTokenInterface.connected = false;
break;
}
//----------------------------------------------------------------------
// DATA MESSAGE
//----------------------------------------------------------------------
case DATA_IND: {
break;
}
//----------------------------------------------------------------------
// DEFAULT - TBD
//----------------------------------------------------------------------
default: {
break;
}
}