diff options
author | Bertrand SIMONNET <bsimonnet@google.com> | 2016-05-17 19:00:43 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2016-05-17 19:00:43 +0000 |
commit | f635c8336a281df00fe1c5b187aca9f3f673eae6 (patch) | |
tree | 5f08011003a07c9ce74a49062795b598d3e43227 | |
parent | 1c4929d6313d42b330a3d96bfde4c4a824c2f16c (diff) | |
parent | 7b62e822d143d5489da203710ebbf02047e03b32 (diff) | |
download | edison-f635c8336a281df00fe1c5b187aca9f3f673eae6.tar.gz |
Clean the PIO HAL. am: 42cf3872dd
am: 7b62e822d1
* commit '7b62e822d143d5489da203710ebbf02047e03b32':
Clean the PIO HAL.
Change-Id: Ic3f68a1750084b3c164bb52741a08db083ba3d69
-rw-r--r-- | pio_hal/pio_hal.cc | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/pio_hal/pio_hal.cc b/pio_hal/pio_hal.cc index 21784ba..1d778d3 100644 --- a/pio_hal/pio_hal.cc +++ b/pio_hal/pio_hal.cc @@ -108,7 +108,6 @@ std::map<std::string, EdisonPin> board_pins = { }; static int pin_mux(const char* pin, const char* source) { - LOG(INFO) << "pin_mux1 " << pin << " "; std::string pin_name(pin); // If source is NULL, PIO is requesting GPIO. @@ -158,7 +157,6 @@ static int pin_mux(const char* pin, const char* source) { // Configure SPI2 if (s == "SPI") { - LOG(INFO) << "SPI PIN " << pin_name; if (pin_name == "IO10") { set_pin_direction(226, "in"); set_mode(111, 1); @@ -197,7 +195,6 @@ static int pin_mux(const char* pin, const char* source) { // Configure I2C if (s == "I2C") { - LOG(INFO) << "PIO HAL I2C pin " << pin_name; if (pin_name == "IO18") { set_pin_direction(212, "in"); set_pin_direction(14, "in"); @@ -220,7 +217,6 @@ static int pin_mux(const char* pin, const char* source) { } if (s == "UART") { - LOG(INFO) << "PIO HAL UART pin" << pin_name; if (pin_name == "IO0") { set_pin_direction(248, "out"); @@ -239,8 +235,7 @@ static int pin_mux(const char* pin, const char* source) { return false; } -static int pin_mux_directon(const char* pin, int dir) { - LOG(INFO) << "pin_mux_directon1 " << pin << " " << dir; +static int pin_mux_direction(const char* pin, int dir) { std::string pin_name(pin); if (!board_pins.count(pin_name)) { @@ -254,12 +249,12 @@ static int pin_mux_directon(const char* pin, int dir) { static int register_device(const peripheral_io_module_t* dev, const peripheral_registration_cb_t* callbacks) { - LOG(INFO) << "register_device"; + LOG(INFO) << "Registering Edison's PIO HAL"; (void)dev; // Set up pin muxing and register GPIO pins. for (auto& pin : board_pins) { callbacks->register_pin(pin.first.c_str(), true, - {pin_mux, pin_mux_directon}); + {pin_mux, pin_mux_direction}); callbacks->register_gpio_sysfs(pin.first.c_str(), pin.second.index); callbacks->set_gpio_pin_mux(pin.first.c_str(), pin.first.c_str()); set_pin_direction(pin.second.output_buffer, "low"); |