#include <tucbot/tucbot.h>
#include <tucbot_additionals/structio.h>
#include <tucbot_additionals/packedCom.h>
struct sTestPackedCom {
uint8_t data1;
uint8_t data2;
uint16_t data3;
} testPackedComReceive;
volatile uint8_t testPackedCom_count_packets_custom;
void testPackedCom(void);
int main(void);
uint8_t i;
uint8_t *data;
if (pd != 0xb1) {
return;
}
if (pLen != sizeof(testPackedComReceive)) {
return;
}
data = (uint8_t *) (&testPackedComReceive);
for (i = 0; i < pLen; i++) {
data[i] = buffer[i];
}
testPackedCom_count_packets_custom++;
}
void testPackedCom(void) {
uint8_t value_active = 0x00;
uint8_t value_count = 0;
uint8_t value_error = 0;
uint16_t value_data = 0;
uint16_t temp;
struct sTestPackedCom testPackedComSend;
testPackedComSend.data1 = 'T';
testPackedComSend.data2 = 'S';
testPackedComSend.data3 = 0;
testPackedCom_count_packets_custom = 0;
while (1) {
testPackedComSend.data3++;
0xb1);
0xb1);
if (value_active) {
} else {
}
}
if (temp != value_active) {
value_active = temp;
if (temp) {
} else {
}
}
temp = testPackedCom_count_packets_custom;
if (temp != value_count) {
value_count = temp;
}
if (temp != value_error) {
value_count = temp;
}
cli();
temp = testPackedComReceive.data3;
sei();
if (temp != value_data) {
value_data = temp;
}
}
}
int main (void) {
testPackedCom();
return (0);
}