ŠTUDENTSKÝ VÝVOJOVÝ TÍM
ŠVT pondelok, 11. 5. 2015
alebo
Systém na otváranie dverí. A viac.
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
Zlý technický stav, nepostačujúce možnosti
Rádovo nižšia ako komerčný systém
Žiaden vendor lock-in
Dostupné diely / jednoduché alternatívy
Plug-and-play inštalácia
Extenzibilita deploymentu
Jednoduchá nahraditeľnosť HW
Modulárna architektúra
Pripravené podporovať zmeny v ISICoch
ŠTUDENTSKÝ VÝVOJOVÝ TÍM
ŠVT pondelok, 11. 5. 2015
svt.fmph.uniba.sk fmfi-svt@googlegroups.com