Newer versions of GCC (8.1.0 in my case) default to `-std=gnu11` (I believe), which expects `inline` to have an external definition. The `Makefile` (I ran it with `NO_ARDUINO` set) doesn't specify any C_FLAGS. Therefore gcc uses the new default value, instead of the old C99 standard. In this case you'll get a linker error for `getIsrTable` not being defined. This change allows the code to successfully compile with new versions of gcc. This change works with the old default std of gcc. For much older versions of gcc it might be better to explicitly set the `std` in `CFLAGS` within the `Makefile`.
With the new beta boards, for those users who don't need an SDCard for
their project, it would be great to allow them to use the 6 IO pins
associated with the SDCARD for other purposes. This would probably
require a cheap adapter, but these are nice signals to be able to be
used. They include:
SPI1: SCK, MISO, MOSI, CS0-2
Serail2: TX/RX
Serial4: TX/RX
I2C1: SCL/SDA
This change adds support for GPIO, SPI, Serial2 and Serial4
PulseIn may fail on LC as it is using *reg to test the value for on or
off, but on LC register is a bitmask associated with several IO pins.
So split off for LC to use the MASK value for the pin to test high and
low.
Warning did not update timings for this, which may be necessary as adds
an & in the loop. However when I tried TLC for 5000us timeout, it timed
out with 5138us, if I decremented the PULSEIN_LOOPS_PER_USEC by one,
then it timed out at 4398... This was at 49mhz.
In case the desired frequency is too low to be obtained with F_TIMER
because prescale and mod were at their limits, switch automatically to
the alternative clock source (31250Hz) before determining prescale and
mod with the same algorithm as before.