1 // Copyright (C) 2014 Michael McMaster <michael@codesrc.com>
\r
3 // This file is part of SCSI2SD.
\r
5 // SCSI2SD is free software: you can redistribute it and/or modify
\r
6 // it under the terms of the GNU General Public License as published by
\r
7 // the Free Software Foundation, either version 3 of the License, or
\r
8 // (at your option) any later version.
\r
10 // SCSI2SD is distributed in the hope that it will be useful,
\r
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
13 // GNU General Public License for more details.
\r
15 // You should have received a copy of the GNU General Public License
\r
16 // along with SCSI2SD. If not, see <http://www.gnu.org/licenses/>.
\r
17 #pragma GCC push_options
\r
18 #pragma GCC optimize("-flto")
\r
22 #include "scsiPhy.h"
\r
29 const char* Notice = "Copyright (C) 2014 Michael McMaster <michael@codesrc.com>";
\r
31 uint8_t testData[512];
\r
39 // Enable global interrupts.
\r
40 // Needed for RST and ATN interrupt handlers.
\r
43 // Set interrupt handlers.
\r
52 uint32_t lastSDPoll = getTime_ms();
\r
60 scsiDev.watchdogTick++;
\r
66 if (unlikely(scsiDev.phase == BUS_FREE))
\r
68 if (unlikely(elapsedTime_ms(lastSDPoll) > 200))
\r
70 lastSDPoll = getTime_ms();
\r
75 // Wait for our 1ms timer to save some power.
\r
83 #pragma GCC pop_options
\r