Clean the PIO HAL. am: 42cf3872dd
am: 7b62e822d1
* commit '7b62e822d143d5489da203710ebbf02047e03b32':
Clean the PIO HAL.
Change-Id: Ic3f68a1750084b3c164bb52741a08db083ba3d69
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 @@
};
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 @@
// 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 @@
// 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 @@
}
if (s == "UART") {
- LOG(INFO) << "PIO HAL UART pin" << pin_name;
if (pin_name == "IO0") {
set_pin_direction(248, "out");
@@ -239,8 +235,7 @@
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 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");