Use the presence of UDRx as an indication that the serial port x might need to be supported.

git-svn-id: https://arducopter.googlecode.com/svn/trunk@1200 f9c3cf11-9bcb-44bc-f272-b75c42450872
This commit is contained in:
DrZiplok 2010-12-19 19:57:34 +00:00
parent 95d683d043
commit 47bb4d22c6
1 changed files with 5 additions and 1 deletions

View File

@ -33,8 +33,12 @@
#include "FastSerial.h"
#include "WProgram.h"
#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
#if defined(UDR3)
# define FS_MAX_PORTS 4
#elif defined(UDR2)
# define FS_MAX_PORTS 3
#elif defined(UDR1)
# define FS_MAX_PORTS 2
#else
# define FS_MAX_PORTS 1
#endif