polish
This commit is contained in:
parent
bfdc39ece1
commit
b2bec39caf
@ -4,29 +4,43 @@
|
|||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Senda copy of DATA_IND to the right application queue
|
||||||
|
*
|
||||||
|
* @param source source Address (addr, sapi)
|
||||||
|
* @param destination destination Address (addr, sapi)
|
||||||
|
* @param dataFramePtr pointer to the data frame
|
||||||
|
|
||||||
|
*/
|
||||||
void send_DATA_IND(Adresse source, Adresse destination, uint8_t* dataFramePtr) {
|
void send_DATA_IND(Adresse source, Adresse destination, uint8_t* dataFramePtr) {
|
||||||
struct queueMsg_t queueMsg; // queue message
|
struct queueMsg_t queueMsg; // queue message
|
||||||
osStatus_t retCode; // return error code
|
osStatus_t retCode; // return error code
|
||||||
char* strPtr;
|
char* strPtr; // string pointer of the message
|
||||||
|
|
||||||
queueMsg.type = DATA_IND;
|
|
||||||
queueMsg.addr = source.addr;
|
|
||||||
queueMsg.sapi = source.sapi;
|
|
||||||
|
|
||||||
|
// Get memmory for new message and test if succed
|
||||||
strPtr = osMemoryPoolAlloc(memPool, 0);
|
strPtr = osMemoryPoolAlloc(memPool, 0);
|
||||||
if(strPtr == NULL) {
|
if(strPtr == NULL) {
|
||||||
assert(false);
|
assert(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Copy data from dataFramePtr to strPtrt8_t* dataFramePtr) {
|
||||||
for(uint8_t i = 0; i < dataFramePtr[2]; i++) {
|
for(uint8_t i = 0; i < dataFramePtr[2]; i++) {
|
||||||
strPtr[i] = (char)dataFramePtr[3+i];
|
strPtr[i] = (char)dataFramePtr[3+i];
|
||||||
}
|
}
|
||||||
strPtr[dataFramePtr[2]] = '\0'; // null-terminate string
|
|
||||||
queueMsg.anyPtr = strPtr;
|
|
||||||
//retCode = osMemoryPoolFree(memPool, dataFramePtr);
|
|
||||||
//CheckRetCode(retCode, __LINE__, __FILE__, CONTINUE);
|
|
||||||
|
|
||||||
|
// add null-terminate string
|
||||||
|
strPtr[dataFramePtr[2]] = '\0';
|
||||||
|
|
||||||
|
// Define data in queueMsg struct
|
||||||
|
queueMsg.type = DATA_IND;
|
||||||
|
queueMsg.addr = source.addr;
|
||||||
|
queueMsg.sapi = source.sapi;
|
||||||
|
queueMsg.anyPtr = strPtr;
|
||||||
|
|
||||||
|
// Test distination
|
||||||
switch (destination.sapi) {
|
switch (destination.sapi) {
|
||||||
|
|
||||||
|
// Send to right application queue
|
||||||
case TIME_SAPI:
|
case TIME_SAPI:
|
||||||
retCode = osMessageQueuePut(
|
retCode = osMessageQueuePut(
|
||||||
queue_timeR_id,
|
queue_timeR_id,
|
||||||
@ -48,30 +62,37 @@ void send_DATA_IND(Adresse source, Adresse destination, uint8_t* dataFramePtr) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Send DATABACK to MAC sender
|
||||||
|
*
|
||||||
|
* @param source source Address (addr, sapi)
|
||||||
|
* @param destination destination Address (addr, sapi)
|
||||||
|
* @param dataFramePtr pointer to the data frame
|
||||||
|
*/
|
||||||
void send_DATABACK(Adresse source, Adresse destination, uint8_t* dataFramePtr) {
|
void send_DATABACK(Adresse source, Adresse destination, uint8_t* dataFramePtr) {
|
||||||
struct queueMsg_t queueMsg; // queue message
|
struct queueMsg_t queueMsg; // queue message
|
||||||
osStatus_t retCode; // return error code
|
osStatus_t retCode; // return error code
|
||||||
|
|
||||||
|
// Define data in queueMsg struct
|
||||||
queueMsg.type = DATABACK;
|
queueMsg.type = DATABACK;
|
||||||
queueMsg.anyPtr = dataFramePtr;
|
queueMsg.anyPtr = dataFramePtr;
|
||||||
queueMsg.addr = source.addr;
|
queueMsg.addr = source.addr;
|
||||||
queueMsg.sapi = source.sapi;
|
queueMsg.sapi = source.sapi;
|
||||||
|
|
||||||
|
// Put on MAC sender queue
|
||||||
retCode = osMessageQueuePut(
|
retCode = osMessageQueuePut(
|
||||||
queue_macS_id,
|
queue_macS_id,
|
||||||
&queueMsg,
|
&queueMsg,
|
||||||
osPriorityNormal,
|
osPriorityNormal,
|
||||||
0);
|
0);
|
||||||
CheckRetCode(retCode, __LINE__, __FILE__, CONTINUE);
|
CheckRetCode(retCode, __LINE__, __FILE__, CONTINUE);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MacReceiver(void *argument) {
|
void MacReceiver(void *argument) {
|
||||||
struct queueMsg_t queueMsg; // queue message
|
struct queueMsg_t queueMsg; // queue message
|
||||||
Adresse src;
|
Adresse src; // source Address (addr, sapi)
|
||||||
Adresse dst;
|
Adresse dst; // destination Address (addr, sapi)
|
||||||
uint8_t length;
|
uint8_t length;
|
||||||
Status status;
|
Status status;
|
||||||
uint8_t* msg;
|
uint8_t* msg;
|
||||||
@ -82,6 +103,7 @@ void MacReceiver(void *argument) {
|
|||||||
// QUEUE READ
|
// QUEUE READ
|
||||||
//--------------------------------------------------------------------------
|
//--------------------------------------------------------------------------
|
||||||
{
|
{
|
||||||
|
// Get message from queue, test retCode and get msg
|
||||||
retCode = osMessageQueueGet(
|
retCode = osMessageQueueGet(
|
||||||
queue_macR_id,
|
queue_macR_id,
|
||||||
&queueMsg,
|
&queueMsg,
|
||||||
@ -91,6 +113,10 @@ void MacReceiver(void *argument) {
|
|||||||
|
|
||||||
msg = queueMsg.anyPtr;
|
msg = queueMsg.anyPtr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------
|
||||||
|
// SWITCH ON MESSAGE TYPE
|
||||||
|
//--------------------------------------------------------------------------
|
||||||
switch (queueMsg.type) {
|
switch (queueMsg.type) {
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
@ -101,6 +127,7 @@ void MacReceiver(void *argument) {
|
|||||||
//--------------------------------------------------------------
|
//--------------------------------------------------------------
|
||||||
// TOKEN
|
// TOKEN
|
||||||
//--------------------------------------------------------------
|
//--------------------------------------------------------------
|
||||||
|
// Send token to MAC sender
|
||||||
queueMsg.type = TOKEN;
|
queueMsg.type = TOKEN;
|
||||||
retCode = osMessageQueuePut(
|
retCode = osMessageQueuePut(
|
||||||
queue_macS_id,
|
queue_macS_id,
|
||||||
@ -113,6 +140,7 @@ void MacReceiver(void *argument) {
|
|||||||
//--------------------------------------------------------------
|
//--------------------------------------------------------------
|
||||||
// MESSAGE
|
// MESSAGE
|
||||||
//--------------------------------------------------------------
|
//--------------------------------------------------------------
|
||||||
|
// Get source Addresse, destination Addresse, length and status
|
||||||
src.raw = msg[0];
|
src.raw = msg[0];
|
||||||
dst.raw = msg[1];
|
dst.raw = msg[1];
|
||||||
length = msg[2];
|
length = msg[2];
|
||||||
@ -125,6 +153,7 @@ void MacReceiver(void *argument) {
|
|||||||
dst.addr == BROADCAST_ADDRESS ) {
|
dst.addr == BROADCAST_ADDRESS ) {
|
||||||
|
|
||||||
if((Checksum(msg) & 0x3F) == status.checksum) {
|
if((Checksum(msg) & 0x3F) == status.checksum) {
|
||||||
|
// Checksum OK -----------------------------------------
|
||||||
status.ack = 1;
|
status.ack = 1;
|
||||||
|
|
||||||
if(dst.sapi == CHAT_SAPI && gTokenInterface.connected ||
|
if(dst.sapi == CHAT_SAPI && gTokenInterface.connected ||
|
||||||
@ -135,7 +164,7 @@ void MacReceiver(void *argument) {
|
|||||||
} else {
|
} else {
|
||||||
status.read = 0;
|
status.read = 0;
|
||||||
}
|
}
|
||||||
msg[3+length] = status.raw;
|
msg[3+length] = status.raw; // Add status to message
|
||||||
|
|
||||||
if(src.addr == gTokenInterface.myAddress) { // For me, from me
|
if(src.addr == gTokenInterface.myAddress) { // For me, from me
|
||||||
// Send DATABACK -----------------------------------
|
// Send DATABACK -----------------------------------
|
||||||
|
99
mac_sender.c
99
mac_sender.c
@ -5,19 +5,28 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
uint8_t* lastToken;
|
uint8_t* lastToken; // Pointer to last token
|
||||||
uint8_t* lastSentMsgPtr;
|
uint8_t* lastSentMsgPtr; // Pointer to last sent message (for retransmission)
|
||||||
|
|
||||||
|
// Queue for messages to be sent when token is received
|
||||||
osMessageQueueId_t queue_macData_id;
|
osMessageQueueId_t queue_macData_id;
|
||||||
const osMessageQueueAttr_t queue_macData_attr = {
|
const osMessageQueueAttr_t queue_macData_attr = {
|
||||||
.name = "MAC_DATA"
|
.name = "MAC_DATA"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Send token to the next station
|
||||||
|
*/
|
||||||
void sendToken() {
|
void sendToken() {
|
||||||
|
// Create queueMsg struct with new memory
|
||||||
struct queueMsg_t queueMsg;
|
struct queueMsg_t queueMsg;
|
||||||
queueMsg.anyPtr = osMemoryPoolAlloc(memPool,osWaitForever);
|
queueMsg.anyPtr = osMemoryPoolAlloc(memPool,osWaitForever);
|
||||||
memcpy(queueMsg.anyPtr, lastToken, TOKENSIZE-2);
|
|
||||||
queueMsg.type = TO_PHY;
|
queueMsg.type = TO_PHY;
|
||||||
|
|
||||||
|
// Copy token
|
||||||
|
memcpy(queueMsg.anyPtr, lastToken, TOKENSIZE-2);
|
||||||
|
|
||||||
|
// Send token to PHY
|
||||||
osStatus_t retCode = osMessageQueuePut(
|
osStatus_t retCode = osMessageQueuePut(
|
||||||
queue_phyS_id,
|
queue_phyS_id,
|
||||||
&queueMsg,
|
&queueMsg,
|
||||||
@ -26,18 +35,24 @@ void sendToken() {
|
|||||||
CheckRetCode(retCode, __LINE__, __FILE__, CONTINUE);
|
CheckRetCode(retCode, __LINE__, __FILE__, CONTINUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief MAC sender task
|
||||||
|
*/
|
||||||
void MacSender(void *argument) {
|
void MacSender(void *argument) {
|
||||||
struct queueMsg_t queueMsg; // queue message
|
struct queueMsg_t queueMsg; // queue message
|
||||||
uint8_t* msg;
|
uint8_t* msg; // pointer to message
|
||||||
Adresse src;
|
Adresse src; // source Address
|
||||||
Adresse dst;
|
Adresse dst; // destination Address
|
||||||
uint8_t length;
|
uint8_t length; // length of message
|
||||||
Status status;
|
Status status; // status of message
|
||||||
osStatus_t retCode; // return error code
|
osStatus_t retCode; // return error code
|
||||||
char* strPtr;
|
char* strPtr; // pointer to string message
|
||||||
SapiToken stationStatus;
|
SapiToken stationStatus; // Status of one station
|
||||||
|
|
||||||
|
// Allocate memory for last token
|
||||||
lastToken = osMemoryPoolAlloc(memPool, osWaitForever);
|
lastToken = osMemoryPoolAlloc(memPool, osWaitForever);
|
||||||
|
|
||||||
|
// Create queue for messages to be sent when token is received
|
||||||
queue_macData_id = osMessageQueueNew(4, sizeof(struct queueMsg_t), &queue_macData_attr);
|
queue_macData_id = osMessageQueueNew(4, sizeof(struct queueMsg_t), &queue_macData_attr);
|
||||||
|
|
||||||
|
|
||||||
@ -45,6 +60,8 @@ void MacSender(void *argument) {
|
|||||||
//--------------------------------------------------------------------------
|
//--------------------------------------------------------------------------
|
||||||
// QUEUE READ
|
// QUEUE READ
|
||||||
//--------------------------------------------------------------------------
|
//--------------------------------------------------------------------------
|
||||||
|
{
|
||||||
|
// Get message from queue, test retCode and get msg
|
||||||
retCode = osMessageQueueGet(
|
retCode = osMessageQueueGet(
|
||||||
queue_macS_id,
|
queue_macS_id,
|
||||||
&queueMsg,
|
&queueMsg,
|
||||||
@ -53,6 +70,7 @@ void MacSender(void *argument) {
|
|||||||
CheckRetCode(retCode, __LINE__, __FILE__, CONTINUE);
|
CheckRetCode(retCode, __LINE__, __FILE__, CONTINUE);
|
||||||
|
|
||||||
msg = queueMsg.anyPtr;
|
msg = queueMsg.anyPtr;
|
||||||
|
}
|
||||||
|
|
||||||
switch(queueMsg.type) {
|
switch(queueMsg.type) {
|
||||||
|
|
||||||
@ -61,8 +79,6 @@ void MacSender(void *argument) {
|
|||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
case TOKEN: {
|
case TOKEN: {
|
||||||
// Get token and save it
|
// Get token and save it
|
||||||
// osDelay(300);
|
|
||||||
//lastToken = osMemoryPoolAlloc(memPool,osWaitForever);
|
|
||||||
memcpy(lastToken, msg, TOKENSIZE-2);
|
memcpy(lastToken, msg, TOKENSIZE-2);
|
||||||
|
|
||||||
// update token
|
// update token
|
||||||
@ -81,13 +97,12 @@ void MacSender(void *argument) {
|
|||||||
osWaitForever);
|
osWaitForever);
|
||||||
CheckRetCode(retCode, __LINE__, __FILE__, CONTINUE);
|
CheckRetCode(retCode, __LINE__, __FILE__, CONTINUE);
|
||||||
|
|
||||||
|
// Free memory
|
||||||
retCode = osMemoryPoolFree(memPool, queueMsg.anyPtr);
|
retCode = osMemoryPoolFree(memPool, queueMsg.anyPtr);
|
||||||
CheckRetCode(retCode, __LINE__, __FILE__, CONTINUE);
|
CheckRetCode(retCode, __LINE__, __FILE__, CONTINUE);
|
||||||
|
|
||||||
// Send one msg from internal queue if exist
|
// Send one msg from internal queue if exist
|
||||||
//if (osMemoryPoolGetCount(queue_macData_id) != 0) { // Message in Queue
|
|
||||||
retCode = osMessageQueueGet(queue_macData_id, &queueMsg, NULL, 0);
|
retCode = osMessageQueueGet(queue_macData_id, &queueMsg, NULL, 0);
|
||||||
//CheckRetCode(retCode, __LINE__, __FILE__, CONTINUE);
|
|
||||||
if(retCode == 0){
|
if(retCode == 0){
|
||||||
queueMsg.type = TO_PHY;
|
queueMsg.type = TO_PHY;
|
||||||
retCode = osMessageQueuePut(
|
retCode = osMessageQueuePut(
|
||||||
@ -106,17 +121,22 @@ void MacSender(void *argument) {
|
|||||||
// DATABACK MESSAGE
|
// DATABACK MESSAGE
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
case DATABACK: {
|
case DATABACK: {
|
||||||
|
// Get source Addresse, destination Addresse, length and status
|
||||||
src.raw = msg[0];
|
src.raw = msg[0];
|
||||||
dst.raw = msg[1];
|
dst.raw = msg[1];
|
||||||
length = msg[2];
|
length = msg[2];
|
||||||
status.raw = msg[3+length];
|
status.raw = msg[3+length];
|
||||||
|
|
||||||
if (dst.addr == BROADCAST_ADDRESS) {
|
if (dst.addr == BROADCAST_ADDRESS) {
|
||||||
|
// Broadcast message -> free memory
|
||||||
retCode = osMemoryPoolFree(memPool, queueMsg.anyPtr);
|
retCode = osMemoryPoolFree(memPool, queueMsg.anyPtr);
|
||||||
CheckRetCode(retCode, __LINE__, __FILE__, CONTINUE);
|
CheckRetCode(retCode, __LINE__, __FILE__, CONTINUE);
|
||||||
sendToken();
|
|
||||||
} else if(src.addr != gTokenInterface.myAddress) {
|
|
||||||
|
|
||||||
|
// Send token
|
||||||
|
sendToken();
|
||||||
|
|
||||||
|
} else if(src.addr != gTokenInterface.myAddress) {
|
||||||
|
// Not from me -> to PHY
|
||||||
queueMsg.type = TO_PHY;
|
queueMsg.type = TO_PHY;
|
||||||
retCode = osMessageQueuePut(
|
retCode = osMessageQueuePut(
|
||||||
queue_phyS_id,
|
queue_phyS_id,
|
||||||
@ -127,7 +147,7 @@ void MacSender(void *argument) {
|
|||||||
|
|
||||||
} else if(status.read == 1) {
|
} else if(status.read == 1) {
|
||||||
if(status.ack == 1) {
|
if(status.ack == 1) {
|
||||||
// Everything is fine, free memory
|
// Read + ack => Everything is fine -> free memory and send token
|
||||||
retCode = osMemoryPoolFree(memPool, queueMsg.anyPtr);
|
retCode = osMemoryPoolFree(memPool, queueMsg.anyPtr);
|
||||||
CheckRetCode(retCode, __LINE__, __FILE__, CONTINUE);
|
CheckRetCode(retCode, __LINE__, __FILE__, CONTINUE);
|
||||||
retCode = osMemoryPoolFree(memPool, lastSentMsgPtr);
|
retCode = osMemoryPoolFree(memPool, lastSentMsgPtr);
|
||||||
@ -135,11 +155,8 @@ void MacSender(void *argument) {
|
|||||||
sendToken();
|
sendToken();
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// Checksum error, send original message again
|
// Read but checksum error, send original message again
|
||||||
if(lastSentMsgPtr != NULL) {
|
if(lastSentMsgPtr != NULL) {
|
||||||
//retCode = osMemoryPoolFree(memPool, queueMsg.anyPtr);
|
|
||||||
//CheckRetCode(retCode, __LINE__, __FILE__, CONTINUE);
|
|
||||||
|
|
||||||
memcpy(queueMsg.anyPtr, lastSentMsgPtr, lastSentMsgPtr[2]+4);
|
memcpy(queueMsg.anyPtr, lastSentMsgPtr, lastSentMsgPtr[2]+4);
|
||||||
queueMsg.type = TO_PHY;
|
queueMsg.type = TO_PHY;
|
||||||
//queueMsg.anyPtr = lastSentMsgPtr;
|
//queueMsg.anyPtr = lastSentMsgPtr;
|
||||||
@ -168,6 +185,7 @@ void MacSender(void *argument) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
// Not read => Station not connected -> free backup message
|
||||||
retCode = osMemoryPoolFree(memPool, queueMsg.anyPtr);
|
retCode = osMemoryPoolFree(memPool, queueMsg.anyPtr);
|
||||||
CheckRetCode(retCode, __LINE__, __FILE__, CONTINUE);
|
CheckRetCode(retCode, __LINE__, __FILE__, CONTINUE);
|
||||||
|
|
||||||
@ -185,6 +203,7 @@ void MacSender(void *argument) {
|
|||||||
0);
|
0);
|
||||||
CheckRetCode(retCode, __LINE__, __FILE__, CONTINUE);
|
CheckRetCode(retCode, __LINE__, __FILE__, CONTINUE);
|
||||||
|
|
||||||
|
// Send token
|
||||||
sendToken();
|
sendToken();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -195,25 +214,18 @@ void MacSender(void *argument) {
|
|||||||
// NEW TOKEN MESSAGE
|
// NEW TOKEN MESSAGE
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
case NEW_TOKEN: {
|
case NEW_TOKEN: {
|
||||||
|
// Create new token
|
||||||
lastToken[0] = TOKEN_TAG;
|
lastToken[0] = TOKEN_TAG;
|
||||||
|
|
||||||
for(uint8_t i = 1; i < sizeof(TOKENSIZE-2); i++) {
|
// Set all station status to 0
|
||||||
lastToken[i] = 0;
|
memset(lastToken, 0, sizeof(TOKENSIZE-2));
|
||||||
}
|
|
||||||
|
// Set my station status on station list and lastToken
|
||||||
gTokenInterface.station_list[gTokenInterface.myAddress] = (0x1 << TIME_SAPI) + (gTokenInterface.connected << CHAT_SAPI);
|
gTokenInterface.station_list[gTokenInterface.myAddress] = (0x1 << TIME_SAPI) + (gTokenInterface.connected << CHAT_SAPI);
|
||||||
lastToken[gTokenInterface.myAddress+1] = gTokenInterface.station_list[gTokenInterface.myAddress];
|
lastToken[gTokenInterface.myAddress+1] = gTokenInterface.station_list[gTokenInterface.myAddress];
|
||||||
sendToken();
|
|
||||||
/*
|
|
||||||
queueMsg.type = TO_PHY;
|
|
||||||
queueMsg.anyPtr = lastToken;
|
|
||||||
|
|
||||||
retCode = osMessageQueuePut(
|
// Send token
|
||||||
queue_phyS_id,
|
sendToken();
|
||||||
&queueMsg,
|
|
||||||
osPriorityNormal,
|
|
||||||
osWaitForever);
|
|
||||||
CheckRetCode(retCode, __LINE__, __FILE__, CONTINUE);
|
|
||||||
*/
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -237,6 +249,7 @@ void MacSender(void *argument) {
|
|||||||
// DATA MESSAGE
|
// DATA MESSAGE
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
case DATA_IND: {
|
case DATA_IND: {
|
||||||
|
// Set source Addresse, destination Addresse and length
|
||||||
dst.addr = queueMsg.addr;
|
dst.addr = queueMsg.addr;
|
||||||
dst.sapi = queueMsg.sapi;
|
dst.sapi = queueMsg.sapi;
|
||||||
dst.nothing = 0;
|
dst.nothing = 0;
|
||||||
@ -245,6 +258,7 @@ void MacSender(void *argument) {
|
|||||||
src.nothing = 0;
|
src.nothing = 0;
|
||||||
length = strlen(queueMsg.anyPtr);
|
length = strlen(queueMsg.anyPtr);
|
||||||
|
|
||||||
|
// Set station status
|
||||||
if(dst.addr == BROADCAST_ADDRESS) {
|
if(dst.addr == BROADCAST_ADDRESS) {
|
||||||
status.read = 1;
|
status.read = 1;
|
||||||
status.ack = 1;
|
status.ack = 1;
|
||||||
@ -255,24 +269,33 @@ void MacSender(void *argument) {
|
|||||||
stationStatus.raw = gTokenInterface.station_list[dst.addr];
|
stationStatus.raw = gTokenInterface.station_list[dst.addr];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Check if destination is online
|
||||||
if( (dst.addr == BROADCAST_ADDRESS) || (stationStatus.chat == 1)) {
|
if( (dst.addr == BROADCAST_ADDRESS) || (stationStatus.chat == 1)) {
|
||||||
|
|
||||||
|
// Allocate memory for message and check if allocation was successful
|
||||||
msg = osMemoryPoolAlloc(memPool, 0);
|
msg = osMemoryPoolAlloc(memPool, 0);
|
||||||
if(msg == NULL) {
|
if(msg == NULL) {
|
||||||
printf("Memory allocation failed #1\r\n");
|
printf("Memory allocation failed #1\r\n");
|
||||||
assert(false);
|
assert(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Set message
|
||||||
msg[0] = src.raw;
|
msg[0] = src.raw;
|
||||||
msg[1] = dst.raw;
|
msg[1] = dst.raw;
|
||||||
msg[2] = length;
|
msg[2] = length;
|
||||||
|
|
||||||
|
// Copy message to memory
|
||||||
memcpy(&msg[3], queueMsg.anyPtr, length);
|
memcpy(&msg[3], queueMsg.anyPtr, length);
|
||||||
|
|
||||||
|
// Set status
|
||||||
status.checksum = Checksum(msg);
|
status.checksum = Checksum(msg);
|
||||||
msg[3+length] = status.raw;
|
msg[3+length] = status.raw;
|
||||||
|
|
||||||
|
// Free memory
|
||||||
retCode = osMemoryPoolFree(memPool, queueMsg.anyPtr);
|
retCode = osMemoryPoolFree(memPool, queueMsg.anyPtr);
|
||||||
CheckRetCode(retCode, __LINE__, __FILE__, CONTINUE);
|
CheckRetCode(retCode, __LINE__, __FILE__, CONTINUE);
|
||||||
|
|
||||||
|
// Backup message if destination is chat station and isn't a broadcast message
|
||||||
if( (dst.addr != BROADCAST_ADDRESS) && (dst.sapi == CHAT_SAPI) ) {
|
if( (dst.addr != BROADCAST_ADDRESS) && (dst.sapi == CHAT_SAPI) ) {
|
||||||
lastSentMsgPtr = osMemoryPoolAlloc(memPool, 0);
|
lastSentMsgPtr = osMemoryPoolAlloc(memPool, 0);
|
||||||
if(lastSentMsgPtr == NULL) {
|
if(lastSentMsgPtr == NULL) {
|
||||||
@ -282,6 +305,7 @@ void MacSender(void *argument) {
|
|||||||
memcpy(lastSentMsgPtr, msg, length+4);
|
memcpy(lastSentMsgPtr, msg, length+4);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Send message to PHY
|
||||||
queueMsg.anyPtr = msg;
|
queueMsg.anyPtr = msg;
|
||||||
queueMsg.type = TO_PHY;
|
queueMsg.type = TO_PHY;
|
||||||
retCode = osMessageQueuePut(
|
retCode = osMessageQueuePut(
|
||||||
@ -292,6 +316,7 @@ void MacSender(void *argument) {
|
|||||||
CheckRetCode(retCode, __LINE__, __FILE__, CONTINUE);
|
CheckRetCode(retCode, __LINE__, __FILE__, CONTINUE);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
// Destination is not online
|
||||||
strPtr = queueMsg.anyPtr;
|
strPtr = queueMsg.anyPtr;
|
||||||
sprintf(strPtr, "%d is not online\0", dst.addr+1);
|
sprintf(strPtr, "%d is not online\0", dst.addr+1);
|
||||||
queueMsg.type = MAC_ERROR;
|
queueMsg.type = MAC_ERROR;
|
||||||
|
2
main.c
2
main.c
@ -404,7 +404,7 @@ int main(void) {
|
|||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// Create Threads
|
// Create Threads
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// audio_id = osThreadNew(AudioPlayer, NULL, &audio_attr);
|
audio_id = osThreadNew(AudioPlayer, NULL, &audio_attr);
|
||||||
debug_id = osThreadNew(DebugStation, NULL, &debug_attr);
|
debug_id = osThreadNew(DebugStation, NULL, &debug_attr);
|
||||||
phy_rec_id = osThreadNew(PhReceiver, NULL, &phy_rec_attr);
|
phy_rec_id = osThreadNew(PhReceiver, NULL, &phy_rec_attr);
|
||||||
phy_snd_id = osThreadNew(PhSender, NULL, &phy_snd_attr);
|
phy_snd_id = osThreadNew(PhSender, NULL, &phy_snd_attr);
|
||||||
|
4
main.h
4
main.h
@ -16,9 +16,9 @@
|
|||||||
//--------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------
|
||||||
// Constants to change the system behavior
|
// Constants to change the system behavior
|
||||||
//--------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------
|
||||||
#define DEBUG_MODE 0 // mode is physical line (0) or debug (1)
|
#define DEBUG_MODE 1 // mode is physical line (0) or debug (1)
|
||||||
#define MYADDRESS 3 // your address choice (table number)
|
#define MYADDRESS 3 // your address choice (table number)
|
||||||
#define MAX_BLOCK_SIZE 100 // size max for a frame
|
#define MAX_BLOCK_SIZE 250 // size max for a frame
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------
|
||||||
// Constants to NOT change for the system working
|
// Constants to NOT change for the system working
|
||||||
|
@ -145,7 +145,7 @@
|
|||||||
<SetRegEntry>
|
<SetRegEntry>
|
||||||
<Number>0</Number>
|
<Number>0</Number>
|
||||||
<Key>ST-LINKIII-KEIL_SWO</Key>
|
<Key>ST-LINKIII-KEIL_SWO</Key>
|
||||||
<Name>-U066DFF485153826687131237 -O8398 -SF1800 -C0 -A0 -I2 -HNlocalhost -HP7184 -P2 -N00("ARM CoreSight SW-DP (ARM Core") -D00(5BA02477) -L00(0) -TO131075 -TC216000000 -TT216000000 -TP21 -TDS806B -TDT0 -TDC1F -TIE1 -TIP1 -FO7 -FD20010000 -FC1000 -FN1 -FF0STM32F7x_1024.FLM -FS08000000 -FL0100000 -FP0($$Device:STM32F746NGHx$CMSIS\Flash\STM32F7x_1024.FLM) -WA0 -WE0 -WVCE4 -WS2710 -WM0 -WP2</Name>
|
<Name>-U066EFF3731324B4D43133455 -O8398 -SF1800 -C0 -A0 -I2 -HNlocalhost -HP7184 -P2 -N00("ARM CoreSight SW-DP (ARM Core") -D00(5BA02477) -L00(0) -TO131075 -TC216000000 -TT216000000 -TP21 -TDS806B -TDT0 -TDC1F -TIE1 -TIP1 -FO7 -FD20010000 -FC1000 -FN1 -FF0STM32F7x_1024.FLM -FS08000000 -FL0100000 -FP0($$Device:STM32F746NGHx$CMSIS\Flash\STM32F7x_1024.FLM) -WA0 -WE0 -WVCE4 -WS2710 -WM0 -WP2</Name>
|
||||||
</SetRegEntry>
|
</SetRegEntry>
|
||||||
<SetRegEntry>
|
<SetRegEntry>
|
||||||
<Number>0</Number>
|
<Number>0</Number>
|
||||||
@ -157,41 +157,9 @@
|
|||||||
<Bp>
|
<Bp>
|
||||||
<Number>0</Number>
|
<Number>0</Number>
|
||||||
<Type>0</Type>
|
<Type>0</Type>
|
||||||
<LineNumber>108</LineNumber>
|
<LineNumber>18</LineNumber>
|
||||||
<EnabledFlag>1</EnabledFlag>
|
<EnabledFlag>0</EnabledFlag>
|
||||||
<Address>134255386</Address>
|
<Address>134314022</Address>
|
||||||
<ByteObject>0</ByteObject>
|
|
||||||
<HtxType>0</HtxType>
|
|
||||||
<ManyObjects>0</ManyObjects>
|
|
||||||
<SizeOfObject>0</SizeOfObject>
|
|
||||||
<BreakByAccess>0</BreakByAccess>
|
|
||||||
<BreakIfRCount>1</BreakIfRCount>
|
|
||||||
<Filename>.\mac_sender.c</Filename>
|
|
||||||
<ExecCommand></ExecCommand>
|
|
||||||
<Expression>\\tokenring_project\mac_sender.c\108</Expression>
|
|
||||||
</Bp>
|
|
||||||
<Bp>
|
|
||||||
<Number>1</Number>
|
|
||||||
<Type>0</Type>
|
|
||||||
<LineNumber>110</LineNumber>
|
|
||||||
<EnabledFlag>1</EnabledFlag>
|
|
||||||
<Address>134255394</Address>
|
|
||||||
<ByteObject>0</ByteObject>
|
|
||||||
<HtxType>0</HtxType>
|
|
||||||
<ManyObjects>0</ManyObjects>
|
|
||||||
<SizeOfObject>0</SizeOfObject>
|
|
||||||
<BreakByAccess>0</BreakByAccess>
|
|
||||||
<BreakIfRCount>1</BreakIfRCount>
|
|
||||||
<Filename>.\mac_sender.c</Filename>
|
|
||||||
<ExecCommand></ExecCommand>
|
|
||||||
<Expression>\\tokenring_project\mac_sender.c\110</Expression>
|
|
||||||
</Bp>
|
|
||||||
<Bp>
|
|
||||||
<Number>2</Number>
|
|
||||||
<Type>0</Type>
|
|
||||||
<LineNumber>116</LineNumber>
|
|
||||||
<EnabledFlag>1</EnabledFlag>
|
|
||||||
<Address>134254758</Address>
|
|
||||||
<ByteObject>0</ByteObject>
|
<ByteObject>0</ByteObject>
|
||||||
<HtxType>0</HtxType>
|
<HtxType>0</HtxType>
|
||||||
<ManyObjects>0</ManyObjects>
|
<ManyObjects>0</ManyObjects>
|
||||||
@ -200,29 +168,61 @@
|
|||||||
<BreakIfRCount>1</BreakIfRCount>
|
<BreakIfRCount>1</BreakIfRCount>
|
||||||
<Filename>.\mac_receiver.c</Filename>
|
<Filename>.\mac_receiver.c</Filename>
|
||||||
<ExecCommand></ExecCommand>
|
<ExecCommand></ExecCommand>
|
||||||
<Expression>\\tokenring_project\mac_receiver.c\116</Expression>
|
<Expression>\\tokenring_project\mac_receiver.c\18</Expression>
|
||||||
</Bp>
|
</Bp>
|
||||||
<Bp>
|
<Bp>
|
||||||
<Number>3</Number>
|
<Number>1</Number>
|
||||||
<Type>0</Type>
|
<Type>0</Type>
|
||||||
<LineNumber>89</LineNumber>
|
<LineNumber>106</LineNumber>
|
||||||
<EnabledFlag>1</EnabledFlag>
|
<EnabledFlag>0</EnabledFlag>
|
||||||
<Address>134255344</Address>
|
<Address>0</Address>
|
||||||
<ByteObject>0</ByteObject>
|
<ByteObject>0</ByteObject>
|
||||||
<HtxType>0</HtxType>
|
<HtxType>0</HtxType>
|
||||||
<ManyObjects>0</ManyObjects>
|
<ManyObjects>0</ManyObjects>
|
||||||
<SizeOfObject>0</SizeOfObject>
|
<SizeOfObject>0</SizeOfObject>
|
||||||
<BreakByAccess>0</BreakByAccess>
|
<BreakByAccess>0</BreakByAccess>
|
||||||
<BreakIfRCount>1</BreakIfRCount>
|
<BreakIfRCount>0</BreakIfRCount>
|
||||||
|
<Filename>.\mac_receiver.c</Filename>
|
||||||
|
<ExecCommand></ExecCommand>
|
||||||
|
<Expression></Expression>
|
||||||
|
</Bp>
|
||||||
|
<Bp>
|
||||||
|
<Number>2</Number>
|
||||||
|
<Type>0</Type>
|
||||||
|
<LineNumber>107</LineNumber>
|
||||||
|
<EnabledFlag>0</EnabledFlag>
|
||||||
|
<Address>0</Address>
|
||||||
|
<ByteObject>0</ByteObject>
|
||||||
|
<HtxType>0</HtxType>
|
||||||
|
<ManyObjects>0</ManyObjects>
|
||||||
|
<SizeOfObject>0</SizeOfObject>
|
||||||
|
<BreakByAccess>0</BreakByAccess>
|
||||||
|
<BreakIfRCount>0</BreakIfRCount>
|
||||||
|
<Filename>.\mac_receiver.c</Filename>
|
||||||
|
<ExecCommand></ExecCommand>
|
||||||
|
<Expression></Expression>
|
||||||
|
</Bp>
|
||||||
|
<Bp>
|
||||||
|
<Number>3</Number>
|
||||||
|
<Type>0</Type>
|
||||||
|
<LineNumber>264</LineNumber>
|
||||||
|
<EnabledFlag>1</EnabledFlag>
|
||||||
|
<Address>0</Address>
|
||||||
|
<ByteObject>0</ByteObject>
|
||||||
|
<HtxType>0</HtxType>
|
||||||
|
<ManyObjects>0</ManyObjects>
|
||||||
|
<SizeOfObject>0</SizeOfObject>
|
||||||
|
<BreakByAccess>0</BreakByAccess>
|
||||||
|
<BreakIfRCount>0</BreakIfRCount>
|
||||||
<Filename>.\mac_sender.c</Filename>
|
<Filename>.\mac_sender.c</Filename>
|
||||||
<ExecCommand></ExecCommand>
|
<ExecCommand></ExecCommand>
|
||||||
<Expression>\\tokenring_project\mac_sender.c\89</Expression>
|
<Expression></Expression>
|
||||||
</Bp>
|
</Bp>
|
||||||
<Bp>
|
<Bp>
|
||||||
<Number>4</Number>
|
<Number>4</Number>
|
||||||
<Type>0</Type>
|
<Type>0</Type>
|
||||||
<LineNumber>92</LineNumber>
|
<LineNumber>86</LineNumber>
|
||||||
<EnabledFlag>1</EnabledFlag>
|
<EnabledFlag>0</EnabledFlag>
|
||||||
<Address>0</Address>
|
<Address>0</Address>
|
||||||
<ByteObject>0</ByteObject>
|
<ByteObject>0</ByteObject>
|
||||||
<HtxType>0</HtxType>
|
<HtxType>0</HtxType>
|
||||||
@ -237,8 +237,8 @@
|
|||||||
<Bp>
|
<Bp>
|
||||||
<Number>5</Number>
|
<Number>5</Number>
|
||||||
<Type>0</Type>
|
<Type>0</Type>
|
||||||
<LineNumber>109</LineNumber>
|
<LineNumber>106</LineNumber>
|
||||||
<EnabledFlag>1</EnabledFlag>
|
<EnabledFlag>0</EnabledFlag>
|
||||||
<Address>0</Address>
|
<Address>0</Address>
|
||||||
<ByteObject>0</ByteObject>
|
<ByteObject>0</ByteObject>
|
||||||
<HtxType>0</HtxType>
|
<HtxType>0</HtxType>
|
||||||
@ -253,8 +253,8 @@
|
|||||||
<Bp>
|
<Bp>
|
||||||
<Number>6</Number>
|
<Number>6</Number>
|
||||||
<Type>0</Type>
|
<Type>0</Type>
|
||||||
<LineNumber>111</LineNumber>
|
<LineNumber>107</LineNumber>
|
||||||
<EnabledFlag>1</EnabledFlag>
|
<EnabledFlag>0</EnabledFlag>
|
||||||
<Address>0</Address>
|
<Address>0</Address>
|
||||||
<ByteObject>0</ByteObject>
|
<ByteObject>0</ByteObject>
|
||||||
<HtxType>0</HtxType>
|
<HtxType>0</HtxType>
|
||||||
@ -278,46 +278,164 @@
|
|||||||
<SizeOfObject>0</SizeOfObject>
|
<SizeOfObject>0</SizeOfObject>
|
||||||
<BreakByAccess>0</BreakByAccess>
|
<BreakByAccess>0</BreakByAccess>
|
||||||
<BreakIfRCount>0</BreakIfRCount>
|
<BreakIfRCount>0</BreakIfRCount>
|
||||||
|
<Filename>.\mac_sender.c</Filename>
|
||||||
|
<ExecCommand></ExecCommand>
|
||||||
|
<Expression></Expression>
|
||||||
|
</Bp>
|
||||||
|
<Bp>
|
||||||
|
<Number>8</Number>
|
||||||
|
<Type>0</Type>
|
||||||
|
<LineNumber>106</LineNumber>
|
||||||
|
<EnabledFlag>0</EnabledFlag>
|
||||||
|
<Address>0</Address>
|
||||||
|
<ByteObject>0</ByteObject>
|
||||||
|
<HtxType>0</HtxType>
|
||||||
|
<ManyObjects>0</ManyObjects>
|
||||||
|
<SizeOfObject>0</SizeOfObject>
|
||||||
|
<BreakByAccess>0</BreakByAccess>
|
||||||
|
<BreakIfRCount>0</BreakIfRCount>
|
||||||
<Filename>.\main.c</Filename>
|
<Filename>.\main.c</Filename>
|
||||||
<ExecCommand></ExecCommand>
|
<ExecCommand></ExecCommand>
|
||||||
<Expression></Expression>
|
<Expression></Expression>
|
||||||
</Bp>
|
</Bp>
|
||||||
|
<Bp>
|
||||||
|
<Number>9</Number>
|
||||||
|
<Type>0</Type>
|
||||||
|
<LineNumber>107</LineNumber>
|
||||||
|
<EnabledFlag>0</EnabledFlag>
|
||||||
|
<Address>0</Address>
|
||||||
|
<ByteObject>0</ByteObject>
|
||||||
|
<HtxType>0</HtxType>
|
||||||
|
<ManyObjects>0</ManyObjects>
|
||||||
|
<SizeOfObject>0</SizeOfObject>
|
||||||
|
<BreakByAccess>0</BreakByAccess>
|
||||||
|
<BreakIfRCount>0</BreakIfRCount>
|
||||||
|
<Filename>.\main.c</Filename>
|
||||||
|
<ExecCommand></ExecCommand>
|
||||||
|
<Expression></Expression>
|
||||||
|
</Bp>
|
||||||
|
<Bp>
|
||||||
|
<Number>10</Number>
|
||||||
|
<Type>0</Type>
|
||||||
|
<LineNumber>106</LineNumber>
|
||||||
|
<EnabledFlag>0</EnabledFlag>
|
||||||
|
<Address>0</Address>
|
||||||
|
<ByteObject>0</ByteObject>
|
||||||
|
<HtxType>0</HtxType>
|
||||||
|
<ManyObjects>0</ManyObjects>
|
||||||
|
<SizeOfObject>0</SizeOfObject>
|
||||||
|
<BreakByAccess>0</BreakByAccess>
|
||||||
|
<BreakIfRCount>0</BreakIfRCount>
|
||||||
|
<Filename>.\main.h</Filename>
|
||||||
|
<ExecCommand></ExecCommand>
|
||||||
|
<Expression></Expression>
|
||||||
|
</Bp>
|
||||||
|
<Bp>
|
||||||
|
<Number>11</Number>
|
||||||
|
<Type>0</Type>
|
||||||
|
<LineNumber>107</LineNumber>
|
||||||
|
<EnabledFlag>0</EnabledFlag>
|
||||||
|
<Address>0</Address>
|
||||||
|
<ByteObject>0</ByteObject>
|
||||||
|
<HtxType>0</HtxType>
|
||||||
|
<ManyObjects>0</ManyObjects>
|
||||||
|
<SizeOfObject>0</SizeOfObject>
|
||||||
|
<BreakByAccess>0</BreakByAccess>
|
||||||
|
<BreakIfRCount>0</BreakIfRCount>
|
||||||
|
<Filename>.\main.h</Filename>
|
||||||
|
<ExecCommand></ExecCommand>
|
||||||
|
<Expression></Expression>
|
||||||
|
</Bp>
|
||||||
|
<Bp>
|
||||||
|
<Number>12</Number>
|
||||||
|
<Type>0</Type>
|
||||||
|
<LineNumber>106</LineNumber>
|
||||||
|
<EnabledFlag>0</EnabledFlag>
|
||||||
|
<Address>0</Address>
|
||||||
|
<ByteObject>0</ByteObject>
|
||||||
|
<HtxType>0</HtxType>
|
||||||
|
<ManyObjects>0</ManyObjects>
|
||||||
|
<SizeOfObject>0</SizeOfObject>
|
||||||
|
<BreakByAccess>0</BreakByAccess>
|
||||||
|
<BreakIfRCount>0</BreakIfRCount>
|
||||||
|
<Filename>.\phy_receiver.c</Filename>
|
||||||
|
<ExecCommand></ExecCommand>
|
||||||
|
<Expression></Expression>
|
||||||
|
</Bp>
|
||||||
|
<Bp>
|
||||||
|
<Number>13</Number>
|
||||||
|
<Type>0</Type>
|
||||||
|
<LineNumber>107</LineNumber>
|
||||||
|
<EnabledFlag>0</EnabledFlag>
|
||||||
|
<Address>0</Address>
|
||||||
|
<ByteObject>0</ByteObject>
|
||||||
|
<HtxType>0</HtxType>
|
||||||
|
<ManyObjects>0</ManyObjects>
|
||||||
|
<SizeOfObject>0</SizeOfObject>
|
||||||
|
<BreakByAccess>0</BreakByAccess>
|
||||||
|
<BreakIfRCount>0</BreakIfRCount>
|
||||||
|
<Filename>.\phy_receiver.c</Filename>
|
||||||
|
<ExecCommand></ExecCommand>
|
||||||
|
<Expression></Expression>
|
||||||
|
</Bp>
|
||||||
|
<Bp>
|
||||||
|
<Number>14</Number>
|
||||||
|
<Type>0</Type>
|
||||||
|
<LineNumber>106</LineNumber>
|
||||||
|
<EnabledFlag>0</EnabledFlag>
|
||||||
|
<Address>0</Address>
|
||||||
|
<ByteObject>0</ByteObject>
|
||||||
|
<HtxType>0</HtxType>
|
||||||
|
<ManyObjects>0</ManyObjects>
|
||||||
|
<SizeOfObject>0</SizeOfObject>
|
||||||
|
<BreakByAccess>0</BreakByAccess>
|
||||||
|
<BreakIfRCount>0</BreakIfRCount>
|
||||||
|
<Filename>.\phy_sender.c</Filename>
|
||||||
|
<ExecCommand></ExecCommand>
|
||||||
|
<Expression></Expression>
|
||||||
|
</Bp>
|
||||||
|
<Bp>
|
||||||
|
<Number>15</Number>
|
||||||
|
<Type>0</Type>
|
||||||
|
<LineNumber>107</LineNumber>
|
||||||
|
<EnabledFlag>0</EnabledFlag>
|
||||||
|
<Address>0</Address>
|
||||||
|
<ByteObject>0</ByteObject>
|
||||||
|
<HtxType>0</HtxType>
|
||||||
|
<ManyObjects>0</ManyObjects>
|
||||||
|
<SizeOfObject>0</SizeOfObject>
|
||||||
|
<BreakByAccess>0</BreakByAccess>
|
||||||
|
<BreakIfRCount>0</BreakIfRCount>
|
||||||
|
<Filename>.\phy_sender.c</Filename>
|
||||||
|
<ExecCommand></ExecCommand>
|
||||||
|
<Expression></Expression>
|
||||||
|
</Bp>
|
||||||
</Breakpoint>
|
</Breakpoint>
|
||||||
<WatchWindow1>
|
<WatchWindow1>
|
||||||
<Ww>
|
<Ww>
|
||||||
<count>0</count>
|
<count>0</count>
|
||||||
<WinNumber>1</WinNumber>
|
<WinNumber>1</WinNumber>
|
||||||
<ItemText>gTokenInterface</ItemText>
|
<ItemText>sai</ItemText>
|
||||||
</Ww>
|
</Ww>
|
||||||
<Ww>
|
<Ww>
|
||||||
<count>1</count>
|
<count>1</count>
|
||||||
<WinNumber>1</WinNumber>
|
<WinNumber>1</WinNumber>
|
||||||
<ItemText>t</ItemText>
|
<ItemText>gTokenInterface</ItemText>
|
||||||
</Ww>
|
</Ww>
|
||||||
<Ww>
|
<Ww>
|
||||||
<count>2</count>
|
<count>2</count>
|
||||||
<WinNumber>1</WinNumber>
|
<WinNumber>1</WinNumber>
|
||||||
<ItemText>lastToken,0x10</ItemText>
|
<ItemText>t</ItemText>
|
||||||
</Ww>
|
</Ww>
|
||||||
<Ww>
|
<Ww>
|
||||||
<count>3</count>
|
<count>3</count>
|
||||||
<WinNumber>1</WinNumber>
|
<WinNumber>1</WinNumber>
|
||||||
<ItemText>memPool</ItemText>
|
<ItemText>lastToken</ItemText>
|
||||||
</Ww>
|
</Ww>
|
||||||
<Ww>
|
<Ww>
|
||||||
<count>4</count>
|
<count>4</count>
|
||||||
<WinNumber>1</WinNumber>
|
<WinNumber>1</WinNumber>
|
||||||
<ItemText>qPtr[0]</ItemText>
|
<ItemText>memPool</ItemText>
|
||||||
</Ww>
|
|
||||||
<Ww>
|
|
||||||
<count>5</count>
|
|
||||||
<WinNumber>1</WinNumber>
|
|
||||||
<ItemText>qPtr[1]</ItemText>
|
|
||||||
</Ww>
|
|
||||||
<Ww>
|
|
||||||
<count>6</count>
|
|
||||||
<WinNumber>1</WinNumber>
|
|
||||||
<ItemText>qPtr[2]</ItemText>
|
|
||||||
</Ww>
|
</Ww>
|
||||||
</WatchWindow1>
|
</WatchWindow1>
|
||||||
<MemoryWindow1>
|
<MemoryWindow1>
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
<TargetName>Target 1</TargetName>
|
<TargetName>Target 1</TargetName>
|
||||||
<ToolsetNumber>0x4</ToolsetNumber>
|
<ToolsetNumber>0x4</ToolsetNumber>
|
||||||
<ToolsetName>ARM-ADS</ToolsetName>
|
<ToolsetName>ARM-ADS</ToolsetName>
|
||||||
<pCCUsed>5060960::V5.06 update 7 (build 960)::C:\Program Files (x86)\ARM_Compiler_5.06u7</pCCUsed>
|
<pCCUsed>5060960::V5.06 update 7 (build 960)::..\..\Program Files (x86)\ARM_Compiler_5.06u7</pCCUsed>
|
||||||
<uAC6>0</uAC6>
|
<uAC6>0</uAC6>
|
||||||
<TargetOption>
|
<TargetOption>
|
||||||
<TargetCommonOption>
|
<TargetCommonOption>
|
||||||
|
Reference in New Issue
Block a user