From c27b53796d4741a7767b523699f04639dc8a8af4 Mon Sep 17 00:00:00 2001 From: Alex Mikhalev Date: Mon, 31 Dec 2018 13:48:53 -0700 Subject: [PATCH] fix last bits of namespace pollution --- components/sx127x_driver/sx127x_driver.c | 6 +++--- components/sx127x_driver/sx127x_internal.h | 7 ++----- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/components/sx127x_driver/sx127x_driver.c b/components/sx127x_driver/sx127x_driver.c index 0f4981c..ff771c9 100644 --- a/components/sx127x_driver/sx127x_driver.c +++ b/components/sx127x_driver/sx127x_driver.c @@ -76,9 +76,9 @@ esp_err_t sx127x_init(const sx127x_config_t *config, sx127x_t **handle_ptr) { // perform reset gpio_set_level(config->rst_io_num, 0); - vTaskDelay(RESET_DELAY); + vTaskDelay(SX127X_RESET_DELAY); gpio_set_level(config->rst_io_num, 1); - vTaskDelay(RESET_DELAY); + vTaskDelay(SX127X_RESET_DELAY); spi_bus_config_t bus_config = { .mosi_io_num = config->mosi_io_num, @@ -100,7 +100,7 @@ esp_err_t sx127x_init(const sx127x_config_t *config, sx127x_t **handle_ptr) { .duty_cycle_pos = 0, .cs_ena_pretrans = 0, .cs_ena_posttrans = 0, - .clock_speed_hz = SPI_CLOCK_HZ, // 8mhz + .clock_speed_hz = SX127X_SPI_CLOCK_HZ, // 8mhz .input_delay_ns = 0, .spics_io_num = config->cs_io_num, .flags = 0, diff --git a/components/sx127x_driver/sx127x_internal.h b/components/sx127x_driver/sx127x_internal.h index 0fe6bd5..43c5d64 100644 --- a/components/sx127x_driver/sx127x_internal.h +++ b/components/sx127x_driver/sx127x_internal.h @@ -12,13 +12,10 @@ #define SX127X_TX_QUEUE_LEN 8 #define SX127X_SPI_QUEUE_SIZE 8 #define SX127X_SPI_DMA_CHAN 1 +#define SX127X_SPI_CLOCK_HZ (8 * 1000 * 1000) #define SX127X_MAX_TRANSFER (256) -#define RESET_DELAY (pdMS_TO_TICKS(15)) - -// 8mhz -#define SPI_CLOCK_HZ (8 * 1000 * 1000) - +#define SX127X_RESET_DELAY (pdMS_TO_TICKS(15)) #ifdef NODEBUG