renamed UartReceiver to UartReader
diff --git a/bbb_cape/src/bbb/bbb.gyp b/bbb_cape/src/bbb/bbb.gyp
index ddbf388..e26cc5c 100644
--- a/bbb_cape/src/bbb/bbb.gyp
+++ b/bbb_cape/src/bbb/bbb.gyp
@@ -16,7 +16,7 @@
       ],
     },
     {
-      'target_name': 'uart_receiver',
+      'target_name': 'uart_reader',
       'type': 'static_library',
       'dependencies': [
         'crc',
@@ -28,33 +28,33 @@
         '<(DEPTH)/bbb_cape/src/cape/cape.gyp:data_struct',
       ],
       'sources': [
-        'uart_receiver.cc',
+        'uart_reader.cc',
       ],
     },
     {
-      'target_name': 'uart_receiver_test',
+      'target_name': 'uart_reader_test',
       'type': 'executable',
       'dependencies': [
-        'uart_receiver',
+        'uart_reader',
         '<(EXTERNALS):gtest',
         '<(AOS)/build/aos.gyp:logging',
       ],
       'sources': [
-        'uart_receiver_test.cc',
+        'uart_reader_test.cc',
       ],
     },
     {
-      'target_name': 'uart_receiver_main',
+      'target_name': 'uart_reader_main',
       'type': 'executable',
       'dependencies': [
-        'uart_receiver',
+        'uart_reader',
         'gpios',
         '<(AOS)/common/common.gyp:time',
         '<(AOS)/build/aos.gyp:logging',
         '<(AOS)/atom_code/atom_code.gyp:init',
       ],
       'sources': [
-        'uart_receiver_main.cc',
+        'uart_reader_main.cc',
       ],
     },
     {
diff --git a/bbb_cape/src/bbb/uart_receiver.cc b/bbb_cape/src/bbb/uart_reader.cc
similarity index 95%
rename from bbb_cape/src/bbb/uart_receiver.cc
rename to bbb_cape/src/bbb/uart_reader.cc
index b29723e..f7a7d03 100644
--- a/bbb_cape/src/bbb/uart_receiver.cc
+++ b/bbb_cape/src/bbb/uart_reader.cc
@@ -1,4 +1,4 @@
-#include "bbb/uart_receiver.h"
+#include "bbb/uart_reader.h"
 
 #include <fcntl.h>
 #include <linux/serial.h>
@@ -29,7 +29,7 @@
 const char *device = "/dev/ttyO1";
 }  // namespace
 
-UartReceiver::UartReceiver(int32_t baud_rate)
+UartReader::UartReader(int32_t baud_rate)
     : baud_rate_(baud_rate),
       buf_(new AlignedChar[DATA_STRUCT_SEND_SIZE]),
       fd_(open(device, O_RDWR | O_NOCTTY)) {
@@ -38,7 +38,7 @@
 
   if (fd_ < 0) {
     LOG(FATAL, "open(%s, O_RDWR | O_NOCTTY) failed with %d: %s."
-               " Did you read my note in bbb/uart_receiver.cc?\n",
+               " Did you read my note in bbb/uart_reader.cc?\n",
         device, errno, strerror(errno));
   }
  
@@ -99,12 +99,12 @@
   }
 }
 
-UartReceiver::~UartReceiver() {
+UartReader::~UartReader() {
   delete buf_;
   if (fd_ > 0) close(fd_);
 }
 
-bool UartReceiver::FindPacket() {
+bool UartReader::FindPacket() {
   // How many 0 bytes we've found at the front so far.
   int zeros_found = 0;
   // How many bytes of the packet we've read in (or -1 if we don't know where
@@ -150,7 +150,7 @@
   }
 }
 
-bool UartReceiver::GetPacket(DataStruct *packet) {
+bool UartReader::GetPacket(DataStruct *packet) {
   if (!FindPacket()) return false;
 
   uint32_t unstuffed = cows_unstuff(reinterpret_cast<uint32_t *>(buf_),
diff --git a/bbb_cape/src/bbb/uart_receiver.h b/bbb_cape/src/bbb/uart_reader.h
similarity index 90%
rename from bbb_cape/src/bbb/uart_receiver.h
rename to bbb_cape/src/bbb/uart_reader.h
index 73ba781..9d5a510 100644
--- a/bbb_cape/src/bbb/uart_receiver.h
+++ b/bbb_cape/src/bbb/uart_reader.h
@@ -9,10 +9,10 @@
 
 namespace bbb {
 
-class UartReceiver {
+class UartReader {
  public:
-  UartReceiver(int32_t baud_rate);
-  ~UartReceiver();
+  UartReader(int32_t baud_rate);
+  ~UartReader();
 
   // Returns true if it finds one or false if it gets an I/O error first.
   // packet must be aligned to 4 bytes.
diff --git a/bbb_cape/src/bbb/uart_receiver_main.cc b/bbb_cape/src/bbb/uart_reader_main.cc
similarity index 91%
rename from bbb_cape/src/bbb/uart_receiver_main.cc
rename to bbb_cape/src/bbb/uart_reader_main.cc
index 3e31624..3d78039 100644
--- a/bbb_cape/src/bbb/uart_receiver_main.cc
+++ b/bbb_cape/src/bbb/uart_reader_main.cc
@@ -4,7 +4,7 @@
 #include "aos/common/logging/logging_impl.h"
 #include "aos/common/time.h"
 #include "bbb/gpios.h"
-#include "bbb/uart_receiver.h"
+#include "bbb/uart_reader.h"
 
 using ::aos::time::Time;
 
@@ -15,7 +15,7 @@
   // the board.
   Time kPacketTimeout = Time::InSeconds(1);
 
-  bbb::UartReceiver receiver = bbb::UartReceiver(3000000);
+  bbb::UartReader receiver(3000000);
   bbb::Pin reset_pin = bbb::Pin(1, 6);
   reset_pin.MakeOutput();
 
diff --git a/bbb_cape/src/bbb/uart_reader_test.cc b/bbb_cape/src/bbb/uart_reader_test.cc
new file mode 100644
index 0000000..80f634a
--- /dev/null
+++ b/bbb_cape/src/bbb/uart_reader_test.cc
@@ -0,0 +1,26 @@
+#include "bbb/uart_reader.h"
+
+#include <termios.h>
+
+#include "gtest/gtest.h"
+
+namespace bbb {
+namespace {
+
+class UartReaderTest : public ::testing::Test {
+protected:
+  UartReader test_instance_;
+
+public:
+  UartReaderTest () : test_instance_(UartReader(3000000)) {}
+};
+
+#if 0
+TEST_F(UartReaderTest, SetUpTest) {
+  // Test its ability to open a file descriptor and set a baud rate.
+  ASSERT_EQ(test_instance_.SetUp(), 0);
+}
+#endif
+
+}  // namespace
+}  // namespace bbb
diff --git a/bbb_cape/src/bbb/uart_receiver_test.cc b/bbb_cape/src/bbb/uart_receiver_test.cc
deleted file mode 100644
index 0552b20..0000000
--- a/bbb_cape/src/bbb/uart_receiver_test.cc
+++ /dev/null
@@ -1,26 +0,0 @@
-#include "bbb/uart_receiver.h"
-
-#include <termios.h>
-
-#include "gtest/gtest.h"
-
-namespace bbb {
-namespace {
-
-class UartReceiverTest : public ::testing::Test {
-protected:
-  UartReceiver test_instance_;
-
-public:
-  UartReceiverTest () : test_instance_(UartReceiver(3000000)) {}
-};
-
-#if 0
-TEST_F(UartReceiverTest, SetUpTest) {
-  // Test its ability to open a file descriptor and set a baud rate.
-  ASSERT_EQ(test_instance_.SetUp(), 0);
-}
-#endif
-
-}  // namespace
-}  // namespace bbb