or
What is it?
How does it work?
What advantages does it have?
Hardware
+
// __attribute__((OS_main)) tells the compiler that this function never
// returns and saves us precious space
__attribute__((OS_main)) int main(void) {
hal_init(&comm_byte_received_callback);
// This is the main handling loop
// It handles all packets that can arrive in the Normal mode
while (1) {
if (comm_wait_for_packet(&p[current_packet]) == 0) {
switch (p[current_packet].id) {
case packet_GET_STATUS:
sendACK();
break;
case packet_RFID_SEND:
// We will send data from this packet, and replace them
// in-place with what we receive
hal_spi_begin_transaction();
for (uint8_t i = 0; i < p[current_packet].length; i++) {
p[current_packet].data[i] =
hal_spi_transfer(p[current_packet].data[i]);
}
hal_spi_end_transaction();
// And suddenly, we are a response packet :)
p[current_packet].id = packet_RFID_SEND_COMPLETE;
transmit_and_flip();
break;
case packet_RX_ERROR:
// Retransmit the last packet
comm_transmit_packet(&p[current_packet ^ 1]);
break;
default:
// Unacceptable packet was received in this mode
p[current_packet].id = packet_INVALID_PACKET;
p[current_packet].length = 0;
transmit_and_flip();
break;
Software
Bad technical status, the vendor has disappeared
New deployment is not possible. Pain in the neck to maintain the current one
System can't support future changes in ISICs and can't be extended
Server
Controller
Reader
No vendor lock-in
Plug-and-play setup
HW can be easily replaced
Modular architecture
Ready to support future changes in ISICs
What is it?
How does it work?
What advantages does it have?
svt.fmph.uniba.sk fmfi-svt@googlegroups.com